User:TheZombiemelon/common.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes.
- Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
- Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
- Opera users have to clear their caches through Tools→Preferences
- Konqueror and Safari users can just click the Reload button.
- Chrome: press Ctrl+F5 or Shift+F5
If using another browser, look up instructions on how to clear your cache in your preferred browser.
// Class from original script
//.wds-global-navigation__search-input
$('.cke_source cke_reset cke_enable_context_menu cke_editable cke_editable_themed cke_contents_ltr ui-autocomplete-input').on('keyup', function(){
var txt = $(this).val(),
m = txt.match(/^\!([a-z]+) /),
namespaces;
if (m) {
namespaces = {
tzm: "User:TheZombiemelon",
tclp: "User:IDontCareAboutHistory",
tulo: "User:ThisUserLikesOreo",
tile: "User:Tile Denial",
vampy: "User:7 GRAND UMP",
game: "User:GamesterD",
lb: "User:LettuceBirb",
bp: "User:Ballistic Planet",
drek: "User:Drek'TharSuperSword"
};
if (namespaces.hasOwnProperty(m[1])) {
$(this).val(namespaces[m[1]] + ":" + txt.substr(m[1].length + 2));
}
}
});
WHAMBotMe = true;
importScriptPage('WHAM/code.js', 'dev');
importScriptPage('AllPagesHideRedirect/code.js', 'dev');
importScriptPage('ViewRemoved/code.js', 'dev');
importScriptPage('BackToTopArrow/code.js', 'dev');
importScriptPage('AjaxRedirect/code.js', 'dev');
importScriptPage('PurgeButton/code.js', 'dev');
importScriptPage('AjaxDiff/code.js', 'dev' );
importScriptPage('AnchoredRollback/code.js', 'dev');
massBlockDelay = 1000;
importScriptPage('MassBlock/code.js', 'dev');
importScriptPage('ChatRefresh/code.js', 'dev');
importScriptPage('ChatOptions/code.js', 'dev');
importScriptPage('ContribsLink/code.js', 'dev');
importScriptPage('MessageBlocker/code.js', 'dev');
EditIntroButtonText = 'Edit Intro Section';
importScriptPage('EditIntroButton/code.js', 'dev');
massCategorizationDelay = 1000;
//importScriptPage('MassCategorization/code.js', 'dev');
//importScriptPage('FluidButton/code.js', 'dev');
//importScriptPage('AddButtonsPhoto/code.js', 'dev');
importScriptPage('RecentChangesModule/code.js', 'dev');
SpecialAlert();
addToMasthead();
importArticles({
type: 'script',
articles: [
'u:dev:QuickThreads/code.js',
'u:dev:FastDelete/code.js',
"w:c:dev:Countdown/code.js",
"w:c:dev:RevealAnonIP/code.js",
'u:dev:QuickContribs/code.js',
'u:dev:LastEdited/code.js',
'u:dev:Message/code.js',
'u:dev:ChatReload/code.js',
'u:dev:MessageBlock/code.js',
"w:c:dev:PurgeBlogs/code.js",
'u:dev:FasterBanModule/code.js',
'u:dev:QuickModTools/code.js',
'u:dev:RelatedDiscussionsModule/code.js',
'u:dev:QuickDiff/code.js'
]
});
/*
* Modified version of Ozuzanna's ContribsLink code
* @author Ozuzanna
*/
;(function($, mw) {
var username = mw.config.get("wgUserName");
$('#AccountNavigation > li > .subnav > li:first-child').after(
$('<li />').append('<a href="/wiki/Special:Editcount/'+username+'">My editcount</a>')
);
}) (this.jQuery, this.mediaWiki);
//
//How to make scripts only load for certain ranks of staff:
//if (mw.config.get("wgUserGroups").indexOf('sysop') > -1)
function shameByTimer(invocationUrl) {
var d = getElementById('www.plantsvszombies.wikia.com/wiki/Template:CountGame').innerHTML = Date();
if (d = ("July 12, 2015 00:00:00 EDT"), prompt)
return window.alert('Too bad! You did not make it to 275 before the timer exploded!');
}
myArray = ['plantsvszombies.wikia.com/wiki/Template:CountGame'];
var myObject = shameByTimer.apply(myObject, myArray);
///////
function SpecialAlert() {
var d = getClassById('activityfeed-diff').innerHTML;
var f = mw.config.get('wgactivityfeed-diff');
if (d == 2259699) {
window.alert("It\'s getting away!");
return window.alert("It\'s getting away!");
}
if (f == 2259699) {
window.alert("It\'s about to happen!");
return window.alert("It\'s about to happen!");
}
SpecialAlert();
return console.log('Special Alert Loaded');
}
SpecialAlert();
function loadSpecialAlert() {}
<nowiki> </nowiki><nowiki> </nowiki> $.showCustomModal(msg.title.replace('%pagename', ''), '''<table class="diff" id="activityfeed-diff"></table>''<nowiki/>', {''
id: 'SpecialAlert-modal',
width: $(window).width() - 100
})
function addToMasthead() {
// if (!inUserNamespace) {
// return;
// }
var userName = config.wgTitle.split('/')[0];
if (mw.util.isIPv4Address(userName) || mw.util.isIPv6Address(userName)) {
return;
}
getRecentEdits(userName).done(function(data) {
// var userStatus = getUserStatus(data);
$('.UserProfileMasthead .details').append(
$('<li>', {
css: {
color: lawngreen
}
}).append(
$('<span>', {
text: 'tzm text test'.plain()
}),
' ',
$('<strong>', {
text: "TZM Text Test" // userStatus.status
}),
' ',
$('<img>', {
css: {
'vertical-align': 'bottom'
},
src: //userStatus.image
})
)
);
});
}