User:KurwaAntics/global.js

// AjaxRC settings // window.ajaxPages = ["Special:RecentChanges","Special:Log","Special:WikiActivity"];

// Load scripts // importArticles({   type: "script",    articles: [        "u:dev:RelocateEditDiscussionButtons/code.js",        "u:dev:DisplayClock/code.js",        "u:dev:ReferencePopups/code.js",        "u:dev:FindAndReplace/code.js",        "u:dev:RevealAnonIP/usercode.js",        "u:dev:View_Source/code.js",        "u:dev:SearchSuggest/code.js",        "u:dev:Wikimarks/code.js",        "u:dev:UnsafeScripts/code.js",        "u:dev:AutoStamp/code.js",        "u:dev:SaveKey/code.js"    ] });

// Full resolution images // $("img").click(function(e) {   if ( e.shiftKey ) {        var src = $(this).attr("src").split("/scale-to-width-down", 1);        $(this).attr("src", src).css({"max-width": "100%"});        event.preventDefault;        return false;    } });

if ( $("#file img").length > 0 ) { var src = $("#file img").attr("src").split("/scale-to-width-down", 1); $("#file img").attr("src", src); }

// Case redirect // if ( $('.noarticletext .mw-headline a').length > 0 ) { window.location = $('.noarticletext .mw-headline a').attr('href'); }

// Page load completion indicator // $(window).bind("load", function {  console.log('Everything is ready');   $('#WikiaBar .toolbar').append('  Ready '); });

window.wgEnableLightboxExt = false;

$('.toolbar .tools').append('AuthorizeMessage');

/* ********** Notification ********** */ function authorizeNotification { Notification.requestPermission(function(perm) {       alert(perm);    }); }

function showNotification { var notification = new Notification("Hitler Rants Parodies", {       //dir: "auto",        //lang: "",        body: "Username edited the page.",        //tag: document.getElementById("tag").value,        //icon: "http://vignette4.wikia.nocookie.net/drunken-peasants-podcast/images/4/41/Wikia_Logo.png"    }); /// http://www.w3.org/TR/notifications/#using-events

notification.onclose = console.log.bind(console, "close"); notification.onshow = console.log.bind(console, "show"); notification.onerror = console.log.bind(console, "error"); notification.onclick = console.log.bind(console, "click"); }

document.querySelector("#authorize").onclick = authorizeNotification; document.querySelector("#show").onclick = showNotification;