Difference between revisions 137399 and 137401 on testwiki/// mw:User:PerfektesChaos/js/paneMarker/?.js /// 2012-06-13 [email protected] /// Fingerprint: #0#0# // 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. // Requires: JavaScript 1.3 (contracted; show full) ( function ( mw, $ ) { "use strict"; if ( typeof mw.libs.paneMarker !== "object" ) { mw.libs.paneMarker = { opt: { } }; } mw.libs.paneMarker.vsn = -1. 112; mw.libs.paneMarker.heads = "|dewiki|"; // +"|testwiki|"; mw.libs.paneMarker.favicon = function () { // Try to exchange wiki-favicon for a red one // Precondition: // Page used in vulnerable mode (editing, creation, deletion). // Uses: (contracted; show full) // 2012-06-13 [email protected] var c = -1, learn = true; if ( typeof this.config.chars === "boolean" ) { c = this.config.chars; } else if ( this.heads.indexOf( this.site ) < 0 ) { c = this.config[ "char" + action ]; if (this.lazy) { alert(".flag() heads>"+c); }⏎ learn = false; } if ( c ) { if ( learn ) { c = this.config[ "char" + action ]; learn = ! c; } if ( learn ) { switch ( action ) { case "Diff" : c = 916; // 'Δ' // '±' if not displayed by browser break; case "History" : c = 8595; // '↓' // '^' if not displayed by browser⏎ break; case "Vitally" : if ( c === -1 ) { if ( ! this.lazy ) { c = false; break; } } c = "*"; break; default: c = false; } // switch action } if (this.lazy) { alert(".flag() c="+c); }⏎ if ( c ) { if ( typeof c === "number" ) { c = String.fromCharCode( c ); } if ( typeof c === "string" ) { if ( this.config.rightleft ) { document.title = document.title + " " + c; } else { document.title = c + " " + document.title; } } } if (this.lazy) { alert(".flag() ###"+c+"### lazy="+this.lazy); }⏎ } }; // .flag() mw.libs.paneMarker.flip = function () { // Abbreviate document title by namespace shortcut, if any // Uses: (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=137401.
![]() ![]() 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.
|