User:DuckeyD/global.js

// LastEdited if (wgNamespaceNumber === 0 || wgNamespaceNumber === 2 || wgNamespaceNumber === 4 || wgNamespaceNumber === 14) { // Article, User, Project, Category window.lastEdited = { avatar: false, position: { element: document.getElementById('WikiaMainContent'), method: 'append' }   }; } else if (wgNamespaceNumber === 500) { // UserBlog } else { // MediaWiki, Module, File... window.lastEdited = { avatar: false }; }

// AjaxRC window.ajaxSpecialPages = [ 'Recentchanges', 'WikiActivity', 'Watchlist', 'Log', 'Newpages' ];

// Import importArticles({   type: 'script',    articles: [        'u:dev:AjaxRC/code.js',        'u:dev:MultiUpload/code.js',        'u:dev:NullEditButton/code.js',        'u:dev:PurgeButton/code.js',        'u:dev:LastEdited/code.js',        'u:dev:View Source/code.js',        'u:dev:RevealAnonIP/usercode.js',        'u:dev:LuaError/code.js',        'u:dev:ViewRemoved/code.js',        'u:dev:UserCheck/code.js',        'u:dev:SearchSuggest/code.js',        'u:dev:WhatLinksHere/code.js',        'u:dev:ConsistentNotifications.js',        'u:pl.duckey:User:DuckeyD/header.javascript' // test    ] });

// Bypass Special:InfoboxBuilder // Author: Vuh if($('.template-classification-type-text').data('type') == 'infobox') { $('#ca-edit').attr('href', function(a) { return this.href + '&useeditor=source'; }); }

// Cat redlinks // Author: Nanaki $('#catlinks .newcategory, #WikiaArticle .newcategory').addClass('new');

// Inspectable Mercury preview // Author: DuckeyD // Special thanks to: fngplg mw.hook('wikipage.content').add(function (content) {   if (content[0] && content[0].querySelector('.mobile-preview') !== null) {        content[0].querySelector('.mobile-preview > iframe').contentDocument.querySelector('.article-preview').style.setProperty('pointer-events', 'all');    } });