User:Pfctdayelise/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 can be added at User:Pfctdayelise/monobook.css. |
// [[User:Lupin/popups.js]] - please include this line
mw.loader.load(
'http://en.wiki.x.io/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
popupDelay = 2.0;
/**** afd helper ****/
document.write('<script type="text/javascript"' +
'src="http://en.wiki.x.io/w/index.php?title=User:Jnothman/afd_helper/' +
'script.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* This is to keep track of who is using this extension: [[User:Jnothman/afd_helper/script.js]] */
function addlilink(tabs, url, name, id, title, key){
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
tabs.appendChild(li);
if(id)
{
if(key && title)
{
ta[id] = [key, title];
}
else if(key)
{
ta[id] = [key, ''];
}
else if(title)
{
ta[id] = ['', title];
}
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}
//
//************************************ Changes since I last edited ****************************
//From User:JesseW/monobook.js
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(" - "));
var l=addLink('p-cactions', "/w/index.php?title="+thetitle+"&action=history&gotosince=true", 'since', 'pc-since', 'Changes since I last edited', '', 0);
}
}
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=textContent(document.getElementById("pt-userpage"));
var hists=document.getElementById("pagehistory").childNodes;
for (n=0;n<hists.length;n++) {
if (hists[n].getElementsByTagName && textContent(hists[n].getElementsByTagName("span")[0])==username) {
document.location=hists[n].childNodes[1].href;
return;
}
}
msg.replaceChild(document.createTextNode
("You have not edited this page! (recently)"),
msg.firstChild);
}
// Add Unwatch to watch list
// from [[User:Matthewmayer/monobook.js]]
$( function () {
if (window.location.href.indexOf("Special:Watchlist")!=-1) {
//correct page, so retrieve watchlist items
var items=document.getElementById('bodyContent').getElementsByTagName('li');
for (var i=0;i<items.length;i++) {
//what is the title of this page?
pagename=items[i].getElementsByTagName('a')[0].title;
//create 'unwatch' element
unwatchelt=document.createElement('a');
unwatchelt.setAttribute('href','/w/index.php?title='+pagename+'&action=unwatch');
unwatchelt.setAttribute('title','Unwatch '+pagename);
unwatchelt.appendChild(document.createTextNode('(unwatch)'));
//add the 'unwatch' element
items[i].appendChild(unwatchelt);
}
}
}
);
// adds a 'logs for this page' link to the navigation bar
// if the page is a user's page, talk page or subpage, the link will go to logs for the user instead
// if the page is a special page, then no link is displayed
$(function () {
// get page title
var pagetitleRe=/[^:]*:\/\/en\.wikipedia\.org\/(wiki\/|w\/index\.php\?title=)([^&?#]*)/;
ptitle = pagetitleRe.exec(decodeURI(location.href))[2].split('_').join(' ');
// if this is a user, show the logs for the user rather than the page
if( (window.location.href.indexOf("User:") != -1) || (window.location.href.indexOf("User_talk:") != -1) ) {
regDropSubpages = /[User|User_talk]:([^&?\/]*)[\/]?.*/;
user = regDropSubpages.exec(ptitle)[1];
url = "http://en.wiki.x.io/w/index.php?title=Special%3ALog&user=" + user;
} else if(window.location.href.indexOf("Special:") != -1) {
// don't display link for special pages
return;
} else {
url = "http://en.wiki.x.io/w/index.php?title=Special%3ALog&page=" + ptitle;
}
tabs = document.getElementById('p-tb').getElementsByTagName('ul')[0];
l = addlilink(tabs, url, "Logs", "pt-logs");
});
/**** quick image delete ****/
document.write('<script type="text/javascript"' +
'src="http://en.wiki.x.io/w/index.php?title=User:Howcheng/quickimgdelete.js' +
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* This is to keep track of who is using this extension: [[User:Howcheng/quickimgdelete.js]] */
//
//<nowiki> Log tools
document.write('<script type="text/javascript" src="'
+ 'http://en.wiki.x.io/w/index.php?title=User:Voice_of_All/Sleeper/monobook.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</nowiki>[[Category:Wikipedians who use VoA script|{{PAGENAME}}]]
importScript('user:js/watchlist.js');