User:Codingmasters/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:Codingmasters/monobook.css. |
<!-- TWINKLE revert scripts -->
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinklefluff.js');
<!-- TWINKLE user warning templates -->
importScript('User:AzaToth/morebits.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('User:AzaToth/twinklewarn.js');
<!-- TWINKLE vandalism reporting -->
importScript('User:AzaToth/morebits.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('User:AzaToth/twinklearv.js');
<!-- TWINKLE protection -->
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinkleprotect.js');
<!-- TWINKLE deletion proposal -->
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinkleprod.js');
<!-- TWINKLE settings -->
TwinkleConfig = {
revertMaxRevisions : 25,
userTalkPageMode : 'window',
showSharedIPNotice : true,
openTalkPage : [ 'agf', 'norm', 'vand' ],
openTalkPageOnAutoRevert : false,
openAOLAnonTalkPage : false,
summaryAd : " using [[WP:TWINKLE|TWINKLE]]",
deletionSummaryAd : " using [[WP:TWINKLE|TWINKLE]]",
protectionSummaryAd : " using [[WP:TWINKLE|TWINKLE]]",
watchSpeedyPages : [ 'g3', 'g5', 'g10', 'g11', 'g12' ],
watchProdPages : false,
openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
watchRevertedPages : [ ],
markRevertedPagesAsMinor : [ ],
deleteTalkPageOnDelete : false,
markWarningsAsMinor : false,
markAIVReportAsMinor : false,
markSpeedyPagesAsMinor : false,
markProdPagesAsMinor : false,
confirmUsernameToAIV : true,
toolboxButtons : [ ]
};
<!-- WikiMiniAtlas -->
// [[User:Dschwen/wikiminiatlas2.js]] - please include this line
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Dschwen/wikiminiatlas2.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
<!-- AddLinks -->
// --- ADD VARIOUS LINKS ----
if(!addToolBoxLink) {
function addToolboxLink(url, name, id){
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
addlilink(tb, url, name, id);
}}
//
if(!addTopLink) {
function addTopLink(url, name, id){
var personal = document.getElementById('p-personal').getElementsByTagName('ul')[0];
addlilink(personal, url, name, id);
}}
//
if(!addNavLink) {
function addNavLink(url, name, id){
var navigation = document.getElementById('p-navigation').getElementsByTagName('ul')[0];
addlilink(navigation, url, name, id);
}}
//
if(!addTab) {
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
return addlilink(tabs, url, name, id, title, key);
}}
if(!addLink) {
function addLink(where, url, name, id, title, key, after){
//* where is the id of the toolbar where the button should be added;
// i.e. one of "p-cactions", "p-personal", "p-navigation", or "p-tb".
//
//* url is the URL which will be called when the button is clicked.
// javascript: urls can be used to do more complex things.
//
//* name is what will appear as the name of the button.
//
//* id is the id of the button; it's best to define one.
// Use a prefix to make sure its unique. Optional.
//
//* title is the tooltip title that gives a longer description
// of the button; if you define a accesskey, mention it here. Optional.
//
//* key is the char you want for the accesskey. Optional.
//
//* after is the id of the button you want to follow this one. Optional.
//
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);
var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
if(after) {
tabs.insertBefore(li,document.getElementById(after));
} else {
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;
}}
if(!addlilink) {
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;
}}
<!-- Picture Popups -->
// [[User:Zocky/PicturePopups.js]]
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Zocky/PicturePopups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
<!-- Time -->
importScript('Wikipedia:WikiProject User scripts/Scripts/Time');
<!-- highlightmyname -->
//This script ([[User:ais523/highlightmyname2.js]]) highlights all instances of the
//logged-in user's username on pages by giving them a bright red background. It only
//checks bodyContent, not titles or sidebars, and doesn't change edit windows or
//Special:Preferences.
//<nowiki><pre>
function highlightmyname(n,p) //node, parent node
{
while(n!=null)
{
if(n.nodeType==3) //text node
{
if(n.data.toLowerCase().indexOf(wgUserName.toLowerCase())!=-1)
{
var ix=n.data.toLowerCase().indexOf(wgUserName.toLowerCase());
var t1=ix?document.createTextNode(n.data.substr(0,ix)):null;
var t2=document.createTextNode(n.data.substr(ix,wgUserName.length));
var t3=ix+wgUserName.length==n.data.length?null:
document.createTextNode(n.data.substr(ix+wgUserName.length));
var s1=document.createElement("SPAN");
s1.style.backgroundColor="#FF0000";
s1.appendChild(t2);
var s2=document.createElement("SPAN");
if(t1!=null) s2.appendChild(t1);
s2.appendChild(s1);
if(t3!=null) s2.appendChild(t3);
p.replaceChild(s2,n);
if(t3!=null) highlightmyname(t3,s2); //find remaining occurences in the new nodes
n=s2.nextSibling;
}
else
n=n.nextSibling;
}
else
{
if(n.firstChild!=null) highlightmyname(n.firstChild,n);
n=n.nextSibling;
}
}
}
addOnloadHook(function() {
if(location.href.indexOf("?ais523")==-1&&location.href.indexOf("&ais523")==-1&&
location.href.indexOf("?action=edit")==-1&&location.href.indexOf("?action=submit")==-1&&
location.href.indexOf("&action=edit")==-1&&location.href.indexOf("&action=submit")==-1&&
wgPageName!="Special:Preferences")
highlightmyname(document.getElementById('bodyContent').firstChild,
document.getElementById('bodyContent'));
});
//</pre></nowiki>
<!-- Tags Tab -->
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('User:Seed_2.0/tags.js');
<!-- Tags Tab Options -->
autosubmit=false;
minoredit=false;
show_cwli=true;
<!-- Add Purge Tab -->
// addPurge
addOnloadHook(function () {
var hist; var url;
if (!(hist = document.getElementById('ca-history') )) return;
if (!(url = hist.getElementsByTagName('a')[0] )) return;
if (!(url = url.href )) return;
addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),
'purge', 'ca-purge', 'Purge server cache for this page', '0');
});
//
<!-- Show Last Diff -->
// Originally based on http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510
//See [[Wikipedia:WikiProject User scripts/Scripts/Show last diff]]
// addLastDiff
function addLastDiff()
{
addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title=' + wgPageName + "&diff=cur&oldid=prev", 'last', 'ca-last', 'Show most recent diff');
}
addOnloadHook(addLastDiff);
//
<!-- User Contrib Tabs -->
addOnloadHook(function() {
if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1) //no subpages or history
return;
if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
var username = encodeURIComponent( wgTitle );
addPortletLink("p-cactions", wgServer + "/wiki/Special:Contributions/" + username, "contribs", "ca-contrib", "User contributions");
addPortletLink("p-cactions", "http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=" + username + "&site=en.wikipedia.org", "count", "ca-editcount", "Edit count from Interiot's Tool1");
addPortletLink("p-cactions", "http://www.math.ucla.edu/~aoleg/wp/rfa/edit_summary.cgi?user=" + username + "&site=en.wikipedia.org", "Summary", "ca-summary", "Edit Summary");
}
});
//
<!-- Navigation Shortcuts -->
// [[User:Jsimlo/shortcuts.js]]
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Jsimlo/shortcuts.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function shortcutsInit ()
{
shortcutsAddLink ('Navigation shortcuts', 'Wikipedia:Tools/Navigation shortcuts');
shortcutsAddLink ('AF WikiProject', 'WP:AF'_;
}
<!-- Editcounter -->
//<pre><nowiki>
function countedit() {
countuser = prompt("What user?");
if ( countuser == null ) {
return; }
else if ( countuser == '' ) { alert("Please enter a username.")
return; }
else { alert("Please remember that Editcountitis can be fatal and that WikiProject \n User Scripts can not be held responsible :p");
location.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=' + countuser + '&site=en.wikipedia.org' }
}
function addcountedit() {
addTab("javascript:countedit()", "edit count", "ca-edit count", "edit count", "");
}
addOnloadHook(function() {
if (wgNamespaceNumber != -1 || document.title.indexOf(!"Editing User talk:") ) {
addOnloadHook(addcountedit);
}
});
//</nowiki></pre>