User:M D N S/global.js

importScriptPage('AjaxRC/code.js', 'dev'); importScriptPage('DupImageList/code.js', 'dev'); importScriptPage('AutoEditDropdown/code.js', 'dev'); importScriptPage('EditIntroButton/code.js', 'dev'); // Changes WikiaContributer to IP in Article Comments from rappy $('#WikiaArticleComments .edited-by a[href*="/wiki' +         '/Special:Contributions"]').each(function {       $(this).html(this.href.substring(this.href.lastIndexOf('/') + 1));    }); importScriptPage('User:Quarenon/quickpreview.js', 'rs'); importScriptPage('SearchGoButton/code.js', 'dev'); /* change publish to save and rename to move */ function PublishToSave { $('#wpSave').val('Save changes'); $('a[data-id="move"]').html('Move'); } window.onload=PublishToSave // ***************************** // Kill image popup (from Rappy) // ***************************** $(function changeimagelinks {   if (window.skin == 'oasis') {        var article = $('#WikiaArticle, .LatestPhotosModule, #article-comments');    }    else {        var article = $('#bodyContent');    }    article.unbind('click.lightbox');    var a = document.getElementsByTagName("a");    for ( var t = 0; t < a.length; ++t ) {        var a2 = a[t];        var img = a2.getElementsByTagName("img");        if ( img[0] != null ) {            if ( a2.href.indexOf("images.wikia.com") != -1 ) {                var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1);                a2.setAttribute('href',link);            }        }    } });

/* Timer- RSW */ importScriptPage('MediaWiki:Common.js/displayTimer.js', 'runescape');

//Makes WA into RC   if(wgPageName == 'Special:WikiActivity' && document.body.className.indexOf('skin-oasis') != -1) {window.location = '/wiki/Special:RecentChanges'}

// Adds an "Oasis"-button to Monobook; by User:Tm_T function add_skin_tab {       var URL = wgServer + wgScript + '?title=' + wgPageName + '&useskin=wikia' addPortletLink('p-cactions', URL, "oasis"); }   addOnloadHook(add_skin_tab

/* The famous "Chat Hacks", developed by Monchoman45. Adds two buttons on the right of the bar where you type in your text to post, which are "AFK", which makes you go AFK, and "Clear", which clears Chat. Another major feature of Chat Hacks are "Pings". Pings are a notification that someone said something you put in a box where you store your "pings". You can change your pings, add some, remove some, etc. */

importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

/* Tab Insert, made by Joeytje50. Type a User in chat's name, and press tab, and it will autocomplete for you. */

importScriptPage('User:Joeytje50/tabinsert.js', 'rs');

//Search bar, for Chat. Unknown author, but makes so that a search bar is on the top of the chat header, near the right. Quick way to look something on the wiki up without going to another tab on the Wiki.// $('#ChatHeader').append('  ')

$(function changeimagelinks {       if (window.skin == 'oasis') {            var article = $('#WikiaArticle, .LatestPhotosModule, #article-comments');        }        else {            var article = $('#bodyContent');        }        article.unbind('click.lightbox');        var a = document.getElementsByTagName("a");        for ( var t = 0; t < a.length; ++t ) {            var a2 = a[t];            var img = a2.getElementsByTagName("img");            if ( img[0] != null ) {                if ( a2.href.indexOf("wikia.nocookie.net") != -1 ) {                    var link = wgServer + '/wiki/File:' + a2.getAttribute('data-image-name');                    a2.setAttribute('href',link);                }            }        }    });

/* Kick Script, made by Hairr. Adds a button above logo on the userlist in chat to kick a User, then fill in the name, and kick. */ function kickUserButton { var kickuser = prompt('Enter Username here','User'); if (kickuser.length != 0) { mainRoom.kick({name:kickuser}); } } $('Kick ').prependTo('.Rail')

/* Multi/Group-PM's. Unkown Author, this puts a button next to your AFK and Clear buttons in the text box in chat. After clicking, you then enter the usernames who you want in the Multi/Group-PM, separating with a comma, with no space afterwards. */

if(wgCanonicalSpecialPageName == 'Chat') { function createGroupPM { var users = prompt('Enter comma seperated list of users to start a PM with',''); var users = users.split(','); mainRoom.openPrivateChat(users); } $('form#Write').append('PM'); }