User:Technical 13/common.js

/* make [rollback] and "blocklink" disappear */ /* remove this line to make it work if (wgPageName == "Special:Watchlist" || wgPageName == "Special:RecentChanges" || wgPageName ==  "Special:Contributions") { $('span.mw-rollback-link').remove; $('span.mw-usertoollinks').each(function {        var $elem = $(this);        $elem.children('a:last').replaceWith("-");        $elem.html($elem.html.replace(" | -", ""));    }); }
 * ///Remove this line to make it work

/* Fix for Shades misspelling of Mjoll */ $('a[title^="User:Mjol"]').each(function {   this.innerHTML = this.innerHTML.replace("User:Mjoll", "User:Mjol");    this.innerHTML = this.innerHTML.replace("User:Mjol", "User:Mjoll");    this.title = this.title.replace("User:Mjol (page does not exist)", "User:Mjoll");    this.href = this.href.replace("/edit/User:Mjol?redlink=1", "/page/User:Mjoll"); });

/* Temporary name change mechanic until Extension:User Merge and Delete properly updates the edit count */ $('h1[id^="title"]').each(function {   this.innerHTML = this.innerHTML.replace("User:Technical 13", "User:ShoeMaker"); }); $('a[href^="/page/User:Technical_13"]').each(function {   this.innerHTML = this.innerHTML.replace("Technical 13", "ShoeMaker"); });

/* Shrink all things on my "Contributions" page that no-one has edited since me. */ $('.mw-uctop').closest('li').css({"font-size":"6px", "text-decoration":"italic"});

/* Refresh my WatchList page when viewing every minute */ if (wgPageName == "Special:Watchlist" || wgPageName == "Special:RecentChanges") { setTimeout(function{location = ''},60000); /*   importScripts( 'User:Joenuts/Watchlist.js' ); var timeNow = new Date; var minNow = timeNow.getMinutes; var minNow = minNow - 5; var timeCheck = new Date; timeCheck.setMinutes(minNow); var postTime = $('td.mw-enhanced-rc').html; var nbsp = (postTime.match(/ /g)||[]).length; for (i=0;iN ', ''); var postTime = postTime.replace('m ', ''); var postTime = postTime.replace('b ', ''); var postTime = postTime.replace('! ', ''); var postTime = postTime.split(':', '2'); var postHour = postTime[0]; var postMin = postTime[1]; var timePost = new Date; timePost.setHours(postHour); timePost.setMinutes(postMin); var timePost = timePost.getTime; var timeCheck = timeCheck.getTime; if (timePost >= timeCheck) { var enhRC = $('td.mw-enhanced-rc').html; $('td[class^="mw-enhanced-rc"]').each(function {this.innerHTML = this.innerHTML.replace(enhRC, ' ' + enhRC + ' ');}); /* Using this styles ALL times      $('td[class^="mw-enhanced-rc"]').css({"font-weight":"bold", "font-size":"12pt"});*/ var timeNow = timeNow.toLocaleTimeString; // Can I change the favicon instead of prepending "NEW! - " to the title? /* $('link[rel="shortcut icon"]').href("http://ddowiki.com/images/Favicon.png"); */ document.title = "NEW! - " + timeNow; }   else { var timeNow = timeNow.toLocaleTimeString; document.title = timeNow; } }

/* Custom "Magic Words" // by Technical_13 (aka ShoeMaker) // 21 march, 2013 $('span.wgUserName').html(wgUserName); var wgUserNameE = wgUserName.replace(" ", "_"); $('span.wgUserNamee').html(wgUserNameE); /* Not working as intended yet... Not sure why. var FindOffset = /[\+|\-]?\d\d?\d?\d?\d?/g; TimeZoneOffset = FindOffset.exec(timecorrection); $('span.TimeZoneOffset').html(TimeZoneOffset); */ // wgUserGroups is going to have to go into an array, not 100% sure how I want to process it // I also want to make: var TimeZoneAbbr = Not sure where I can find that info...