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:MyContributions", "Special:Watchlist", "Theo_dõi_các_nhóm_Eng_Tran"]; 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: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", "w:c:dev:TopEditors/code.js", 'u:dev:ListPages/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:Common.js/Konami.js', 'u:sonako:MediaWiki:GA-Chart.js', 'u:sonako:MediaWiki:Common.js/Skin_Switch_Button.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'); if (mediaWiki.config.get('wgPageName') === 'Sonako_Patrol') { importStylesheet('User:Dai_ca_superman/SonakoPatrol.css'); importScript('User:Dai_ca_superman/SonakoPatrol.js'); }

$(function {   var username = wgTitle.indexOf("Contributions/") != -1 ? wgTitle.replace("Contributions/", "") : wgTitle;    $('.tabs-container > ul.tabs').append('Cảnh báo'); });

if (mediaWiki.config.get('wgPageName') === 'Sonako_Real-Time_Feed_(Theo_dõi_các_bản_dịch_của_các_nhóm_Eng_Tran_theo_thời_gian_thực)') { importScript('MediaWiki:Rss.js'); importScript('MediaWiki:Pagination.js'); } importScriptPage('MediaWiki:Auto-Refresh.js','sonako');// importScriptPage('MediaWiki:GA-Chartv2.js','sonako');//