Difference between revisions 137316 and 137327 on testwiki/// mw:User:PerfektesChaos/js/paneMarker/?.js /// 2012-06-12 [email protected] /// Fingerprint: #0#0# /// <nowiki> // Mark browser panes (tabbed or window) if particular action taken. // Try to exchange wiki-favicon for a red one if editing a wiki page. // Insert indicating character before document title. /* jshint curly:true, eqeqeq:true, undef:true, white:false */ /* global document: true, jQuery: true, mediaWiki: true, window: true */ /*jslint plusplus: true, white: true */ /*globals document: true, jQuery: true, mediaWiki: true, window: true */ // Requires: JavaScript 1.3 // MediaWiki 1.18 (mw.libs, jQuery core) ( function ( mw, $ ) { "use strict"; if ( typeof mw.libs.paneMarker !== "object" ) { mw.libs.paneMarker = { opt: { } }; } mw.libs.paneMarker.vsn = 0.425; mw.libs.paneMarker.heads = "|dewiki|"; mw.libs.paneMarker.favicon = function () { // Try to exchange wiki-favicon for a red one // Precondition: // Page used in vulnerable mode (editing, creation, deletion). // Uses: // > this // > .config.site // > .config.appleIcon // > .config.faviconICO // > .config.faviconPNG // .file() // 2012-06-12 [email protected] var $apple, $head = $( document ).find( "head" ), $favicon, i, n, apple = false, png = [ "wmf", "##" ], // a9 show, site = this.config.site; if ( site === "commonswiki" ) { apple = [ "commons", "##" ]; // 70 png = [ "commons", "##e7" ]; } else if ( site === "metawiki" ) { png = [ "meta", "##96" ]; } else if ( site === "testwiki" ) { png = [ "testwiki", "b6" ]; } else if ( site === "mediawikiwiki" ) { apple = [ "mediawiki", "##b6" ]; png = [ "mediawiki", "##fa" ]; } else if ( site.slice( -4 ) === "wiki" ) { apple = [ "wikipedia", "f1" ]; png = [ "wikipedia", "fb" ]; } else if ( site.slice( -9 ) === "wikibooks" ) { png = [ "wikibooks", "##7e" ]; } else if ( site.slice( -8 ) === "wikinews" ) { apple = [ "wikinews", "##a9" ]; png = [ "wikinews", "##cc" ]; } else if ( site.slice( -9 ) === "wikiquote" ) { png = [ "wikiquote", "##cb" ]; } else if ( site.slice( -10 ) === "wikisource" ) { png = [ "wikisource", "##f4" ]; } else if ( site.slice( -11 ) === "wikiversity" ) { png = [ "wikiversity", "##95" ]; } else if ( site.slice( -10 ) === "wiktionary" ) { apple = [ "wiktionary", "##" ]; // Perhelion png = [ "wikipedia", "fb" ]; } else { apple = [ "wmf", "##" ]; // f7 } // https://secure.wikimedia.org/favicon.ico if ( $head.length ) { $favicon = $head.find( "link" ).filter( function() { return ( this.rel === "shortcut icon" ); } ); $apple = $head.find( "link" ).filter( function() { (contracted; show full)// Emacs // Local Variables: // encoding: utf-8-dos // coding: utf-8-dos // fill-column: 80 // End: /// EOF </nowiki> paneMarker/?.js All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://test.wikipedia.org/w/index.php?diff=prev&oldid=137327.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|