summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
15d1965)
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
return document.evaluate(query, root || document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
}
return document.evaluate(query, root || document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
}
+/* from http://stackoverflow.com/questions/1912501 */
+function htmlDecode(input){
+ var e = document.createElement('div');
+ e.innerHTML = input;
+ return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
+}
+
/**
* Add a Direct Download link on the page for the specified URL
*
/**
* Add a Direct Download link on the page for the specified URL
*
var evt = document.createEvent('Event');
evt.initEvent('UrlFetched', true, true);
evt.site = site;
var evt = document.createEvent('Event');
evt.initEvent('UrlFetched', true, true);
evt.site = site;
+ evt.URL = htmlDecode(URL);
document.dispatchEvent(evt);
}
document.dispatchEvent(evt);
}