Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Uniwiki.js: Difference between revisions

MediaWiki interface page
Rayanth (talk | contribs)
No edit summary
Rayanth (talk | contribs)
Undo revision 151970 by Rayanth (talk)
Tag: Undo
Line 6: Line 6:
     frequency: 0.1,
     frequency: 0.1,
     expiryThresholdMs: 2000,
     expiryThresholdMs: 2000,
    cycleTime: 2000,
     addStyleIntvl: null,
     addStyleIntvl: null,
     clearStyleIntvl: null,
     clearStyleIntvl: null,
     maxFlicks: 18,
     maxFlicks: 18,
     minFlicks: 6,
     minFlicks: 6,
    flickerTiming: 1000,
};
};


Line 23: Line 21:


function startUpAprilFools(){
function startUpAprilFools(){
     opts.addStyleIntvl = setInterval(function() {addStyleToRandomWordsInJQueryObject($(opts.pageSelector +  ' .mw-parser-output'), opts)}, cycleTime);
     opts.addStyleIntvl = setInterval(function() {addStyleToRandomWordsInJQueryObject($(opts.pageSelector +  ' .mw-parser-output'), opts)}, 2000);
     addStyleToRandomWordsInJQueryObject($(opts.pageSelector +  " .mw-parser-output"), opts);
     addStyleToRandomWordsInJQueryObject($(opts.pageSelector +  " .mw-parser-output"), opts);
     opts.clearStyleIntvl = setInterval(function() {removeExpiredStyles(opts)}, cycleTime);
     opts.clearStyleIntvl = setInterval(function() {removeExpiredStyles(opts)}, 2000);
     opts.AprilFoolEnable = true;
     opts.AprilFoolEnable = true;
}
}
Line 100: Line 98:
     {         
     {         
         spans.toggleClass('april-fools');
         spans.toggleClass('april-fools');
         sleep = Math.round(Math.random() * flickerTiming)
         sleep = Math.round(Math.random() * 1000)
        //await sleep(Math.round(Math.random() * 100));
         setTimeout(function() {spans.toggleClass('april-fools');}, sleep )
         setTimeout(function() {spans.toggleClass('april-fools');}, sleep )
     }
     }
Line 113: Line 112:
     for(var iter = 0; iter < amount; iter++)
     for(var iter = 0; iter < amount; iter++)
     {
     {
         sleep = Math.round(Math.random() * flickerTiming);
         sleep = Math.round(Math.random() * 1000);
         setTimeout(function() {trigs.toggle(); origs.toggle();}, sleep )
         setTimeout(function() {trigs.toggle(); origs.toggle();}, sleep )
     }
     }