User:Sophiedp/global.js

/* AjaxRC settings */ window.ajaxRefresh = 30000; //30 seconds

/* Show removed replies */ $(".message-removed.hide").removeClass("hide");

/* FastDelete settings */ var fdButtons = []; fdButtons.push({   'summary': 'Housekeeping',    'label': 'HK' });

/* Make RC show bot edits */ //@author-Foodbandlt if (wgPageName == "Special:RecentChanges") { if (window.location.href.indexOf("hidebots=") == -1 && window.location.href.indexOf("?") == -1) { window.location.href = window.location.href + "?hidebots=0"; } else if (window.location.href.indexOf("hidebots=") == -1 && window.location.href.indexOf("?") !== -1) { window.location.href = window.location.href + "&hidebots=0"; } }

/* No autoedit redlinks */ $(function {    var head = $('a[href$="?action=edit&redlink=1"]');    if (head.attr("href")) {        head.attr("href", head.attr("href").replace("?action=edit&redlink=1", ""));    } });

/* QuickCreateUserPage and QuickCreateMessageWall */ if (wgCityId !== "621556") { //Modified version of QuickCreateUserPage $('', {       id: 'qcup',    }).html('Create user page') .prependTo('.toolbar .tools') .click(function {       $.ajax( { type: 'POST', url: mw.util.wikiScript( 'api' ), dataType: 'json', data: { action: 'edit', title: 'User:Sophiedp', summary: 'Creating user page (script)', text: '', format: 'json', token: mw.user.tokens.get( 'editToken' ) }       } ).done( function ( data ) { if ( data.edit.result === 'Success' ) { new BannerNotification("Successfully created page!","confirm").show; } else { new BannerNotification("An error occurred.","error").show; }       } ).fail( function ( data ) { new BannerNotification("An error occurred.","error").show; } );   });    //Modified version of QuickCreateMessageWallGreeting $('', {       id: 'qcmwg',    }).html('Create Greeting') .prependTo('#my-tools-menu') .click(function {       $.ajax( { type: 'POST', url: mw.util.wikiScript( 'api' ), dataType: 'json', data: { action: 'edit', title: 'Message_Wall_Greeting:Sophiedp', summary: 'Creating message wall greeting (script)', text: '', format: 'json', token: mw.user.tokens.get( 'editToken' ) }       } ).done( function ( data ) { if ( data.edit.result === 'Success' ) { new BannerNotification("Successfully created page!","confirm").show; } else { new BannerNotification("An error occurred.","error").show; }       } ).fail( function ( data ) { new BannerNotification("An error occurred.","error").show; } );   }); }

//———————————————————————————————— ! ! ! ————————————————————————————————// /* Place imports below this line. Place everything else above this line. */

/* Staff/VSTF/Bot/Helper highlights */ importStylesheetPage('Highlight/code.css', 'dev');

/* WLB highlights */ importStylesheetPage('MediaWiki:WLBhighlight.css', 'wlb');

/* Imports */ importArticles({   type: "script",    articles: [        'u:dev:MediaWiki:CacheCheck/code.js',        'u:dev:MediaWiki:HeaderLinks/code.js',        'u:dev:MediaWiki:NoImageLightbox/code.js',        'u:dev:MediaWiki:MarkBlocked.js',        'u:dev:MediaWiki:Wikimarks/code.js',        'u:dev:MediaWiki:AjaxRC/code.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:AjaxUndo/code.js',        'u:dev:MediaWiki:FixWantedFiles/code.js',        'u:dev:MediaWiki:HoverEditCount/code.js',        'u:dev:MediaWiki:OldFilePages/code.js',        'u:dev:MediaWiki:QuickDiff/code.js',        'u:dev:MediaWiki:WHAM/code.2.js',        'u:dev:MediaWiki:MarkForDeletion/code.js',        'u:dev:MediaWiki:AnchoredRollback/code.js',        'u:dev:MediaWiki:Rollback/code.js',        'u:dev:MediaWiki:ContribsLink/code.js',        'u:dev:MediaWiki:DupImageList/code.js',        'u:dev:MediaWiki:DisplayTimer/code.js', 'u:dev:MediaWiki:FastDelete/code.js', 'u:dev:MediaWiki:Linksweeper/code.js', 'u:dev:MediaWiki:RecentChangesMultiple/code.2.js' ] });