User:Sophiedp/global.js

/* Remove the part of the url that opens the editor on redlinks */ var head = $('a[href$="?action=edit&redlink=1"]'); if ($('a[href$="?action=edit&redlink=1"]').attr("href")) { head.attr("href", head.attr("href").replace("?action=edit&redlink=1", "")); } /* Hide the footer */ mw.util.addCSS('.wds-global-footer { display: none; }');

/* Link to report thread on suwiki */ $('', {id: 'report'}) .html('SU Report') .prependTo('#my-tools-menu');

/* Make page take the full width of the screen */ $('', {id: 'screenwidth',}) .html('Full Screen') //create the link .prependTo('#my-tools-menu') //attach the link .click(function {   mw.util.addCSS('.WikiaPage {\ border: none !important;\ padding: 0 8px;\ width: calc(100% - 16px);\ }'); });

/* Link to subpages in my tools menu */ $('', {id: 'subpages'}) .html('Subpages') .prependTo('.toolbar .tools');

/* Disable 5 sec edit save delay */ GlobalTriggers.bind("WikiaEditorReady", function(point) { if (point.controls) {    point.controls.editform.off("submit").on("submit", function { point.setState(3); }); } });

/* PageCreator settings */ window.pageCreatorAvatar = true;

/* 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:MarkBlocked.js',        'u:dev:MediaWiki:AjaxRC/code.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:AjaxUndo/code.js',        'u:dev:MediaWiki:PageCreator/code2.js',        'u:dev:MediaWiki:HoverEditCount/code.js',        'u:dev:MediaWiki:QuickDiff/code.js',        'u:dev:MediaWiki:UserAccountAge/code.js',        'u:dev:MediaWiki:ContribsLink/code.js',        'u:dev:MediaWiki:DupImageList/code.js',        'u:dev:MediaWiki:DisplayTimer/code.js',        'u:dev:MediaWiki:DisableCode/code.js',        'u:dev:MediaWiki:CodeQuickLinks/code.js',        'u:dev:MediaWiki:Linksweeper/code.js',        'u:dev:MediaWiki:ConsistentModules/code.js',        'u:dev:MediaWiki:RecentChangesMultiple/code.2.js',        'u:kocka:User:KockaAdmiralac/UnhideUserMasthead.javascript' ] });