This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a new stylesheet to the document; | |
// url [optional] A url to an external stylesheet to use | |
// idx [optional] The index in document.styleSheets to insert the new sheet before | |
function AddStyleSheet(url,idx){ | |
var css,before=null,head=document.getElementsByTagName("head")[0]; | |
if (document.createElement){ | |
if (url){ | |
css = document.createElement('link'); | |
css.rel = 'stylesheet'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |