User:Callofduty4/global.js

importArticles({   type: 'script',    articles: [        'w:dev:OldFilePages/code.js',        'w:vstf:User:Joeyaa/wham.js'    ] });

importScriptURI('http://janitor.wikia.com/index.php?title=User:Callofduty4/scripts.js&action=raw&ctype=text/javascript');

// **************** // Kill image popup // **************** $(function changeimagelinks {   if (window.skin == 'oasis') {        var article = $('#WikiaArticle, .LatestPhotosModule, #article-comments');    }    else {        var article = $('#bodyContent');    }    article.unbind('click.lightbox');    $('a.image').each(function  { $(this).children.each(function {			var filename = $(this).data('image-key');		}); var link = wgServer + '/wiki/File:' + filename; $(this).prop('href', link); }); });

// Monobook easy contribs link

if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User talk") { $('#ca-talk').after('contribs'); }

function PIAdder { var PIhtml = 'Add PI '; $('#filetoc').append(PIhtml); $('#PISubmit').click(function(event) {		newCate = " \n "		this.innerHTML = '';		$.getJSON("/api.php", {action: "query", prop: "info", titles: wgPageName, intoken: "edit", format: "json", indexpageids: 1}, function(json) { var pageidw = json.query.pageids[0]; var tokenk = json.query.pages[pageidw].edittoken; $.post("/api.php", {action: "edit", title: wgPageName, token: tokenk, bot: true, appendtext: newCate + "\n"}, function (result) {$(".PIAdder").remove;}); });	}); } if (wgCanonicalNamespace == 'File') { addOnloadHook(PIAdder); }

/* change publish to save and rename to move */ function PublishToSave { $('#wpSave').val('Save changes'); $('a[data-id="move"]').html('Move'); }

window.onload=PublishToSave