MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ //importScriptPage('MediaWiki:Snow.js','sonako');// SpoilerAlert = { 'class': "Spoiler", question: 'Trang này có spoiler, bạn có muốn xem không?', yes: 'Có, tôi muốn xem.', no: 'Không, tôi không muốn.', isSpoiler: function { return Boolean($('#spoiler').length); } }; var ajaxPages = ["Special:RecentChanges", "Special:WikiActivity", "Special:Log", "Special:MyContributions", "Special:Watchlist"]; var AjaxRCRefreshText = "Auto-refresh"; var ajaxIndicator = "http://images4.wikia.nocookie.net/__cb20100617113123/dev/images/6/6a/Snake_throbber.gif"; nullEditDelay = 1000; var ShowHideConfig = { autoCollapse: 3, en: { show: "xem", hide: "ẩn", showAll: "xem hết", hideAll: "ấn hết" } }; $(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:FloatingToc/code.js', "w:dev:WallGreetingButton/code.js", 'w:c:dev:ReferencePopups/code.js', "u:dev:SearchSuggest/code.js", "u:dev:AjaxRC/code.js", "u:dev:ExternalImageLoader/code.js", "u:dev:InfoWidgets/code.js", "w:c:dev:SpoilerAlert/code.js", 'u:dev:ShowHide/code.js', 'u:dev:NullEditButton/code.js', 'u:dev:MassNullEdit/code.js', "w:c:dev:RevealAnonIP/code.js", 'w:c:dev:AutoEditDropdown/code.js', 'u:sonako:MediaWiki:Common.js/async.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:Button.js', 'u:sonako:MediaWiki:GA.js', 'u:sonako:MediaWiki:Common.js/Skin_Switch_Button.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 }); if (mediaWiki.config.get('wgPageName') === 'Sonako_Patrol') { importStylesheet('User:Dai_ca_superman/SonakoPatrol.css'); importScript('User:Dai_ca_superman/SonakoPatrol.js'); } if (mediaWiki.config.get('wgPageName') === 'Sonako_Real-Time_Feed') { importScript('MediaWiki:Rss.js'); } if (mediaWiki.config.get('wgPageName') === 'Test') { importScript('MediaWiki:Test.js'); }

if (mediaWiki.config.get('wgPageName') === 'Theo_dõi_các_nhóm_Eng_Tran') { importScript('MediaWiki:Twitter.js'); } /* */