MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ //importScriptPage('MediaWiki:Snow.js','sonako');// /* Enables auto refresh on Recent Changes, Watchlist and Wiki Activity pages. Click the check mark if you want it. */ var ajaxPages = ["Special:RecentChanges", "Special:WikiActivity", "Special:Log", "Special:Contributions"]; var AjaxRCRefreshText = "Auto-refresh"; var ajaxIndicator = "http://images4.wikia.nocookie.net/__cb20100617113123/dev/images/6/6a/Snake_throbber.gif";

$(document).ready(function {    if ($('#info-widgets').length) {        window.widgetsLoaded = function  {            np = Widgets.newPages;            np.selector = '#new-pages';            Widgets.add(np);            rc = Widgets.recentChanges;            rc.selector = '#recent-changes';            Widgets.add(rc);            Widgets.add({ selector: '#new-files', type: 'api', params: { action: 'query', format: 'json', list: 'recentchanges', rclimit: 20, rcshow: '!redirect', rcprop: 'title', rcnamespace: 6 }           });         }    } });

/********** Wikipedia:Tools/Navigation popups // wikipedia:User:Lupin/popups importScriptURI("http://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Lupin/popups.js"); popupStructure='menus'; popupDelay=1.5; /** * Configure my list of global.js articles * Grab the list from sessionStorage if available * This allows me to easily turn on/off individual scripts * from the browser console for testing purposes */

var globalJSArticles;

try { globalJSArticles = JSON.parse(sessionStorage.getItem("globalJSArticles")); } catch (e) { globalJSArticles = null; }

if (!jQuery.isArray(globalJSArticles)) { globalJSArticles = [ 'u:dev:PurgeButton/code.js', "u:dev:DynamicImages/code.js", 'u:dev:FloatingToc/code.js', "w:dev:WallGreetingButton/code.js", 'w:c:dev:ReferencePopups/code.js', "u:dev:ListFiles/code.js", "u:dev:SearchSuggest/code.js", "u:dev:AjaxRC/code.js", "u:dev:ExternalImageLoader/code.js", "u:dev:Tooltips/code.js", "u:dev:AjaxPatrol/code.js", "u:dev:InfoWidgets/code.js", "w:c:dev:SpoilerAlert/code.js", 'u:dev:DisplayClock/code.js', 'u:dev:PortableCSSPad/code.js', "w:c:dev:RevealAnonIP/code.js", 'u:sonako:MediaWiki:Common.js/links.js', 'u:sonako:MediaWiki:Common.js/async.js', 'u:sonako:MediaWiki:Wikia.js/mudim.js', 'u:sonako:MediaWiki:Common.js/Usertags.js', 'u:sonako:MediaWiki:StarRatings/stats.js', 'u:sonako:MediaWiki:StarRatings/ui.js', 'u:sonako:MediaWiki:StarRatings/code.js', 'u:sonako:MediaWiki:Watchlist.js', 'u:sonako:User:Dai_ca_superman/rights.js', 'u:sonako:MediaWiki:PowerPageMaker.js' ]; }

console.log("globalJSArticles =", globalJSArticles); console.log("\nglobalJSArticles.splice(4, 1); sessionStorage.setItem(\"globalJSArticles\", JSON.stringify(globalJSArticles)); window.location.reload;\n\nsessionStorage.removeItem(\"globalJSArticles\"); window.location.reload;\n");

// Load all scripts with importArticles // http://help.wikia.com/wiki/Help:Including_additional_JavaScript_and_CSS

importArticles({	type: 'script',	articles: globalJSArticles });

/* */

importScriptPage('MediaWiki:Common.js/Addthis.js', 'sonako');