User:Doc Taxon/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:Doc Taxon/monobook.css. |
// für jegliche Hilfe besten Dank an user:PerfektesChaos
mw.loader.load("//wiki.riteme.site/w/index.php?title=User:PerfektesChaos/js/listPageOptions/r.js&action=raw&ctype=text/javascript&maxage=604800&*","text/javascript");
if ( typeof mw.libs.DocTaxon !== "object" ) {
mw.libs.DocTaxon = { };
}
mw.libs.DocTaxon.nsn = mw.config.get( "wgNamespaceNumber" );
mw.libs.DocTaxon.furnish = function () {
var nsn = mw.libs.DocTaxon.nsn,
pgName = mw.config.get( "wgPageName" ),
server = mw.config.get( "wgServer" ),
title = mw.config.get( "wgTitle" ).replace( /\/.*$/, "" );
/* p-personal */
if ( nsn >= 0 ) {
mw.util.addPortletLink( "p-personal",server + "/w/index.php?title=" + pgName + "&action=purge","Purge","ca-purge","Purge" );
mw.util.addPortletLink( "p-personal",server + "/w/index.php?title=" + "Special:Export&pages=" + pgName + "&dir=desc&limit=5&wpDownload&history=1","Export" );
}
// mw.util.addPortletLink( "p-personal",NULL,"<a href='https://de.wikipedia.org/wiki/Special:Contributions/TaxonBota'>TaxonBota</a>" );
// mw.util.addPortletLink( "p-personal",server + "/wiki/" + "Special:Contributions/TaxonBot","TaxonBot" );
// mw.util.addPortletLink( "p-personal",server + "/wiki/" + "Special:Contributions/TaxonBota","TaxonBota" );
/*
// var iwlist = document.getElementById("p-lang");
// var iwh3 = iwlist.getElementsByTagName("li")[1].innerHTML;
// var iwlist = document.querySelectorAll("a.interlanguage-link-target");
// alert(iwlist[2].innerHTML);
// iwlist[2].innerHTML = "Größe";
// iwlist[2].innerHTML = iwlist[2].innerHTML + " Größe";
// $.get("//de.wikipedia.org/w/api.php?action=query&prop=info&titles=Kessiner", function(data) {
// alert("Data Loaded: " + data);
// var cclist = document.getElementById("column-content");
// cclist.innerHTML = cclist.innerHTML + data;
// alert(cclist.innerHTML);
// });
$("a.interlanguage-link-target").each(function(index, element) {
// element = element.lang + element.title;
var la = element.lang;
var pos = element.title.lastIndexOf(" –");
if (pos === -1) {
title = element.title;
} else {
title = element.title.slice(0, pos);
}
element.innerHTML = la + ": " + title;
// alert(element.innerHTML);
var lenfound = function(data) {
var len = data.query.pages[data.query.pageids[0]].length;
window.console.info( "Seitenlänge: " + len);
// alert(la + ": " + len);
element.innerHTML = la + ": " + title + " | " + len;
};
var lenfault = function() {
window.console.warn( "API-Abfrage hat nicht geklappt." );
alert("Fehler");
};
var fire = function() {
var host = document.location.hostname,
url = document.location.protocol + "//" + la + host.substr( host.indexOf( "." ) ) + mw.util.wikiScript( "api" ),
or = document.location.origin;
if (or.slice(8, or.indexOf(".")) === la) {
var prop = {prop: "info", titles: title, indexpageids: true};
} else {
var prop = {origin: or, prop: "info", titles: title, indexpageids: true};
}
new mw.Api().get(prop, {url: url}).done(lenfound).fail(lenfault);
};
mw.loader.using(["mediawiki.api", "mediawiki.util"], fire);
});
*/
mw.util.addPortletLink( "p-personal","//de.wikipedia.org/wiki/" + "Benutzer:Doc_Taxon/TNX","TNX" );
/* p-navigation */
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Recentchangeslinked/" + pgName,"Änderungen an verlinkten Seiten" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Wikipedia:Autorenportal","Autorenportal" );
if ( nsn === 2 || nsn === 3 ) {
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Contributions/" + title,"Benutzerbeiträge" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:EmailUser/" + title,"Benutzer-eMail" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:UserRights/" + title,"Benutzerrechte" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Block/" + title,"Benutzer sperren" );
}
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + "Special:Book" + "&bookcmd=book_creator&referer=" + pgName,"Buch-Version" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Upload/", "Datei hochladen" );
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + pgName + "&printable=yes","Druckversion" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Hilfe:Übersicht", "Hilfe" );
mw.util.addPortletLink( "p-navigation", "//de.wikipedia.org/wiki/" + "Special:Import/", "Import" );
// mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Import/", "Import" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Wikipedia:Kontakt", "Kontakt" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:RecentChanges/", "Letzte Änderg." );
if ( nsn < 0 ) {
if ( typeof mw.libs.DocTaxon.flip === "function" ) {
mw.util.addPortletLink( "p-navigation","#","Logbuch alt.","t-DocTaxon-flip" );
$( "#t-DocTaxon-flip" ).click( mw.libs.DocTaxon.flip );
}
} else {
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Whatlinkshere/" + pgName,"Links auf Seite" );
}
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Log/" + title,"Logbücher" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Notifications/" + title,"News" );
if ( mw.config.get( "wgCanonicalSpecialPageName" ) === "Watchlist" ) {
mw.util.addPortletLink( "p-navigation","javascript:mw.libs.listPageOptions.unwatch.furnish();void(0);","Nicht beobachten" );
}
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + "Special:Book" + "&bookcmd=render_article&arttitle=" + pgName + "&writer=rl","PDF-Version" );
if ( nsn >= 0 ) {
wdID = mw.config.get( "wgWikibaseItemId" );
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + pgName + "&curid=" + mw.config.get( "wgArticleId" ), "Permalink S." );
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + pgName + "&oldid=" + mw.config.get( "wgCurRevisionId" ),"Permalink V." );
if ( wdID ) {
mw.util.addPortletLink( "p-navigation","//www.wikidata.org/wiki/" + wdID,wdID );
}
}
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + pgName + "&action=info", "Seiteninfos" );
mw.util.addPortletLink( "p-navigation",server + "/wiki/" + "Special:Specialpages/", "Spezialseiten" );
mw.util.addPortletLink( "p-navigation",server + "/w/index.php?title=" + "Special:Cite/" + pgName,"Zitierhilfe" );
}; // .furnish()
mw.hook( "wikipage.content" ).add( function() {
// document: ready; mw.util vorhanden
if ( typeof mw.libs.DocTaxon.loaded !== "boolean" ) {
mw.libs.DocTaxon.furnish();
mw.libs.DocTaxon.loaded = true;
}
} );
// [[:en:User:Lupin/popups.js]]
// mw.loader.load("//wiki.riteme.site/w/index.php?title=" + "User:Lupin/popups.js" + "&action=raw&ctype=text/javascript","text/javascript" );
if ( mw.libs.DocTaxon.nsn <= 1 ) {
// Spezialseite, ANR, A-Disk erforderlich; sonst ersparen
mw.loader.load("https://wiki.riteme.site/w/index.php?title=User:PerfektesChaos/js/externalLinkProblem/r.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript");
// mw.loader.load("//de.wikipedia.org/w/index.php?title=" + "User:PerfektesChaos/js/defekterWeblinkBotVorlage/r.js" + "&action=raw&ctype=text/javascript&maxage=604800&*","text/javascript" );
}
if ( mw.libs.DocTaxon.nsn === -1 || mw.libs.DocTaxon.nsn === 4 ) {
// Spezialseite oder WPNR; sonst funktionslos
// mw.loader.load( "//de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-importUtility.js&action=raw&ctype=text/javascript","text/javascript");
}
if ( ! ( mw.libs.DocTaxon.nsn % 2 ) && "|view|edit|submit|".indexOf( mw.config.get( "wgAction" ) ) > 0 ) {
mw.loader.load("//de.wikipedia.org/w/index.php?title=" + "User:Doc_Taxon/rs.js" + "&action=raw&ctype=text/javascript","text/javascript" );
}
mw.loader.load('https://de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navigation-popups.js/de&action=raw&ctype=text/javascript');
// mw.loader.load('https://wiki.riteme.site/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript');
mw.loader.load('https://wiki.riteme.site/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css');
//[[:de:user:Giftpflanze/llhistory.js]]
mw.loader.load("//de.wikipedia.org/w/index.php?title=user:Giftpflanze/llhistory.js&action=raw&ctype=text/javascript","text/javascript");
//[[:de:user:MGChecker/wikipe-tan.js]]
//mw.loader.load('//de.wikipedia.org/w/index.php?title=user:MGChecker/wikipe-tan.js&action=raw&ctype=text/javascript','text/javascript');
mw.loader.load('//wiki.riteme.site/w/index.php?title=user:Doc_Taxon/wikipe-tan.js&action=raw&ctype=text/javascript','text/javascript');