User:Alexandria/monobook.js
Appearance
(Redirected from User:Kwsn/monobook.js)
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:Alexandria/monobook.css. |
importScript ('User:Henrik/js/afc-helper.js');
//importScript('User:^demon/csd.js'); new version below.
importScript('User:Kwsn/csd.js');
//importScript('User:DerHexer/rollback.js');
//importScript('User:AzaToth/morebits.js');
//importScript('User:AzaToth/twinklefluff.js');
//importScript('User:AzaToth/twinklewarn.js');
//importScript('User:AzaToth/twinklediff.js');
//importScript('User:AzaToth/twinklexfd.js');
//importScript('User:AzaToth/twinklesalt.js');
//importScript('User:AzaToth/twinkledelimages.js');
//importScript('User:AzaToth/twinkleimage.js');
//importScript('User:AzaToth/twinklebatchdelete.js');
//importScript('User:AzaToth/twinkledeprod.js')
TwinkleConfig = {
revertMaxRevisions : 50,
userTalkPageMode : 'window',
showSharedIPNotice : true,
openTalkPage : [ 'norm', 'vand' ],
openTalkPageOnAutoRevert : false,
openAOLAnonTalkPage : false,
summaryAd : " using [[WP:TWINKLE|TW]]",
deletionSummaryAd : " using [[WP:TWINKLE|TW]]",
protectionSummaryAd : " using [[WP:TWINKLE|TW]]",
watchSpeedyPages : [ 'g3', 'g5', 'g10', 'g11', 'g12' ],
watchProdPages : true,
openUserTalkPageOnSpeedyDelete : [ ],
watchRevertedPages : [ ],
markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ],
deleteTalkPageOnDelete : false,
markWarningsAsMinor : true,
markAIVReportAsMinor : true,
markSpeedyPagesAsMinor : true,
markProdPagesAsMinor : true,
confirmUsernameToAIV : true,
watchWarnings : false,
toolboxButtons : [ ]
};
$(function () {
var url = unescape(document.location.toString()).replace('_', ' ');
if (url.indexOf('&diff=') > -1) {
var otitle1 = document.getElementById('mw-diff-otitle1');
if (otitle1) {
var oldlink = otitle1.getElementsByTagName('a')[0];
if (oldlink) {
var oldid = oldlink.href.substring(oldlink.href.indexOf('oldid=') + 6)
var title;
if (url.indexOf('http://wiki.riteme.site/wiki/') >= 0) {
title = url.substring(url.indexOf('http://wiki.riteme.site/wiki/') + 29);
if (title.indexOf('?') >= 0) title = title.substring(0, title.indexOf('?'));
} else if (url.indexOf('title=') >= 0) {
title = url.substring(url.indexOf('title=') + 6);
if (title.indexOf('&') >= 0) title = title.substring(0, title.indexOf('&'));
}
if (title) {
var rvSpan = document.createElement('span');
rvSpan.id = 'mw-diff-orevertto';
rvSpan.style.fontWeight = 'bold';
otitle1.insertBefore(rvSpan, otitle1.lastChild.nextSibling);
var rvLink = document.createElement('a');
rvLink.href = 'http://wiki.riteme.site/w/index.php?title=' + title
+ '&action=edit&oldid=' + oldid + '&script=rv';
rvLink.innerHTML = 'revert-to';
rvLink.title = 'revert';
rvLink.accessKey = 'r';
rvSpan.insertBefore(rvLink, rvSpan.lastChild);
rvSpan.innerHTML = ' [' + rvSpan.innerHTML + ']';
}
}
var prevLink = document.getElementById('differences-prevlink');
if (prevLink) prevLink.accessKey = 'z';
var nextLink = document.getElementById('differences-nextlink');
if (nextLink) nextLink.accessKey = 'x';
}
}
if (url.indexOf('&script=rv') > -1) {
var wpSummary = document.getElementById('wpSummary');
if (wpSummary) {
wpSummary.value = 'revert';
var editForm = document.getElementById('editform');
if (editForm) editForm.submit();
}
}
if (url.indexOf('Special:Recentchanges') > -1) {
var rcOptionsQuery = document.evaluate('//div[@class="rcoptions"]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
if (rcOptionsQuery.snapshotItem(0)) {
var rcOptions = rcOptionsQuery.snapshotItem(0);
if (url.indexOf('&script=rcopenall') > -1) {
var newChangesFrom = rcOptions.getElementsByTagName('a')[14];
if (newChangesFrom) {
var newChangesFromHref = newChangesFrom.href;
var openAllDiv = document.createElement('div');
openAllDiv.id = 'mw-openall';
openAllDiv.style.fontWeight = 'bold';
rcOptions.insertBefore(openAllDiv, rcOptions.lastChild.nextSibling);
var openAllLink = document.createElement('a');
openAllLink.href = newChangesFromHref + '&namespace=0&script=rcopenall';
openAllLink.innerHTML = 'Open next batch in tabs';
openAllLink.accessKey = 'q';
openAllDiv.insertBefore(openAllLink, openAllDiv.lastChild);
}
var rcListQuery = document.evaluate('//ul[@class="special"]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
if (rcListQuery.snapshotItem(0)) {
var rcList = rcListQuery.snapshotItem(0);
for (var i = 0; i < rcList.childNodes.length; i++) {
var rcLink = rcList.childNodes[i].childNodes[1];
if (rcLink) window.open(rcLink.href);
}
}
} else {
var openAllLink = document.createElement('a');
openAllLink.href = 'http://wiki.riteme.site/wiki/Special:Recentchanges?limit=10&namespace=0&hideliu=1&script=rcopenall';
openAllLink.innerHTML = 'Open next batch in tabs';
rcOptions.insertBefore(openAllLink, rcOptions.lastChild.nextSibling);
}
}
}
});
$(function(){
var fix=function(id, text){
var el=document.getElementById(id);
if(!el) return;
for(el=el.firstChild; el && el.nodeName!='A'; el=el.nextSibling);
if(!el) return;
while(el.firstChild) el.removeChild(el.firstChild);
el.appendChild(document.createTextNode(text));
}
/* Add lines as necessary. Use the Firefox DOM inspector or some such to determine
* the appropriate IDs.
*/
//(disabled via commenting) fix('ca-talk', 'discussion');
// fix('ca-delete', 'nuke this page');
});