Showing posts with label greasemonkey. Show all posts
Showing posts with label greasemonkey. Show all posts

Dynamically loading Javascript files

The little snippet below lets you load JS files dynamically, making it easier to load jQuery or mootools for scripts like GreaseMonkey or within Firebug.

var jsfile = document.createElement("script");
jsfile.setAttribute("type", "text/javascript");
jsfile.setAttribute("src", "
http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js");
document.getElementsByTagName("head")[0].appendChild(jsfile);

Using Firebug, I used the following mootools code to hide some elements as a test to see if the script actually loaded.

$each($$('.saveType, .perType'), function(item) {
  item.setStyle('display', 'none');
});

Greasemonkey script to remove "People Who Dugg This Also Dugg"

I've made a simple script to remove the beta box.

Link
 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog