User:SigmaEpsilon/monobook.js
Appearance
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 is at User:SigmaEpsilon/monobook.css. |
$( function (){
var edit_tab = document.getElementById('ca-edit');
var talk_tab = document.getElementById('ca-talk');
var x = document.getElementById('ca-history');
var cat_div = document.getElementById('mw-normal-catlinks');
cat_div.innerHTML = cat_div.innerHTML.replace(/\|/g,'•');
if (edit_tab) edit_tab.firstChild.innerHTML = 'edit';
if (talk_tab) talk_tab.firstChild.innerHTML = 'talk';
if(!x) return;
if(x.children) x = x.children[0].href;
else x = x.childNodes[0].href;
mw.util.addPortletLink("p-cactions", x.replace(/=history/, "=purge"), 'purge', 'ca-purge', 'Purge the internal cache for this page', 0);
});
// install [[User:Cacycle/wikEd]] in-browser text editor
document.write('<script type="text/javascript" src="'
+ 'http://wiki.riteme.site/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
var wikEdLoadRegExTypoFix = true;
//Please leave the following line
//[[user:Where/usertabs]]
$(function() {
if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history
return;
}
if (document.title.indexOf("User:") == 0 || document.title.indexOf("User talk:") == 0) {
username_a = document.URL.match(/:.*:(.*)/);
username=username_a[1];
mw.util.addPortletLink('p-cactions',"http://wiki.riteme.site/wiki/Special:Contributions/" + username, "contrib", "ca-contrib", "Show this user's contributions", "");
mw.util.addPortletLink('p-cactions',"http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=" + username + "&site=wiki.riteme.site", "edit count", "ca-kate", "Show edit count for this user", "");
}
});
// From [[Wikipedia:WikiProject User_scripts/Scripts/Show_last_diff]], revision 67477415
//From http://wiki.riteme.site/w/index.php?title=User:JesseW/monobook.js&oldid=20755510
// addLastDiff
$(function () {
if (!/wiki\/Special:|w\/index.php?title=Special:/.test(window.location.href)) {
z=document.getElementById("content").childNodes;
for (var n=0;n<z.length;n++) {
if (z[n].className=="firstHeading") {
var pname=z[n].textContent ? z[n].textContent : z[n].innerText;
}
}
mw.util.addPortletLink('p-cactions',"http://wiki.riteme.site/w/index.php?title=" + pname + "&diff=cur&oldid=prev", 'last', 'ca-last',"Show most recent diff");
}
});
// From [[Wikipedia:WikiProject User_scripts/Scripts/Changes_since_I_last_edited]], revision 60911506
//From http://wiki.riteme.site/w/index.php?title=User:JesseW/monobook.js&oldid=20755510
function addSinceTab() {
if (window.location.href.indexOf("&action=history&gotosince=true")!=-1) {
do_since_I_last_edited()
}
else if (!/wiki\/Special:|w\/index.php?title=Special:/.test(window.location.href)) {
var thetitle=document.title.slice(0, String(document.title).indexOf(" - "));
mw.util.addPortletLink('p-cactions',"/w/index.php?title="+thetitle+"&action=history&gotosince=true", "since", "ca-since", "Changes since I last edited", "");
}
}
function do_since_I_last_edited() {
var csub=document.getElementById("contentSub");
var msg=document.createElement("p");
msg.appendChild(document.createTextNode
("Parsing history... please wait..."));
msg.className="error";
csub.insertBefore(msg, csub.firstChild)
var username=document.getElementById("pt-userpage").textContent;
var hists=document.getElementById("pagehistory").getElementsByTagName('li');
for (n=0;n<hists.length;n++) {
if (hists[n].getElementsByTagName("span")[0].getElementsByTagName('a')[0].textContent==username) {
document.location=hists[n].childNodes[1].href;
return;
}
}
msg.replaceChild(document.createTextNode
("You have not edited this page! (recently)"),
msg.firstChild);
}
$(addSinceTab);
// From [[Wikipedia:WikiProject User_scripts/Scripts/Edit_Top]], revision 87854342
// This will add an [edit] link at the top of all pages except preview pages and the main page
// by User:Pile0nades
// Add an [edit] link to pages
$(function () {
// if this is preview page or generated page, stop
if (window.location.href.indexOf("/wiki/Special:") != -1) return;
if(document.getElementById("wikiPreview")) return;
// if this is a revision history, stop
if(document.getElementById("histlegend ")) return;
// if this is a diff page, stop
if(document.getElementById("difference ")) return;
// if this is a watchlist, stop
if(document.getElementById("watchdetails")) return;
// if this is the main page, stop
if(document.getElementById("mainpage")) return;
// get the page title
var pageTitle = document.title.split(" - ")[0].replace(" ", "_");
// create div and set innerHTML to link
var divContainer = document.createElement("div");
divContainer.innerHTML = '<div class="editsection" style="float:right;margin-left:5px;margin-right:0px;margin-top:47px;">[<a href="/w/index.php?title='+pageTitle+'&action=edit§ion=0" title="'+document.title.split(" - ")[0]+'">edit</a>]</div>';
// insert divContainer into the DOM below the h1
if(window.location.href.indexOf("&action=edit") == -1)
document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);
if(window.location.href.indexOf("&action=edit§ion=0") != -1)
{
document.getElementById('wpSummary').value = "/* Intro */ ";
}
});
// Import [[User:Lupin/popups.js]]
document.write('<script type="text/javascript" src="http://wiki.riteme.site/w' +
'/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript"></script>');
popupFixDabs = true;
imagePopupsForImages = false;
// jncsp-end