Difference between revisions 137369 and 137379 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) // Uses: // > this // > .config.chars // > .heads // > .config.charDiff // > .config.charHistory // > .config.charVitally // > jQuery.browser.msie⏎ // > .config.rightleft // >< document.title // mw.config.get() // Requires: JavaScript 1.3 String.fromCharCode() // 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.config.site ) < 0 ) { c = this.config[ "char" + action ]; learn = false; } if ( c ) { if ( learn ) { c = this.config[ "char" + action ]; learn = false; } if ( learn ) { switch ( action ) { case "Diff" : c = 916; // 'Δ' // '±' if not displayed by browser break; case "History" : c = 8595; // '↓' break; case "Vitally" : if ( c === -1 ) { c = false; break;if ( jQuery.browser ) { if ( ! jQuery.browser.msie ) { c = false; break; } } } c = "*"; break; default: c = false; } // switch action } (contracted; show full) this.config.site = mw.config.get( "wgDBname" ); this.config.nsN = mw.config.get( "wgNamespaceNumber" ); this.flip(); switch ( mw.config.get( "wgAction" ) ) { case "edit" : case "submit" : this.favicon(); if ( jQuery.browser ) { if ( ! jQuery.browser.msie ) { document.title = document.title + " !"; } }⏎ ⏎ this.flag( "Vitally" ); break; case "history" : this.flag( "History" ); break; case "view" : if ( mw.util.getParamValue( "diff" ) !== null ) { this.flag( "Diff" ); } else if ( this.config.nsN === -1 ) { if ( mw.config.get( "wgCanonicalSpecialPageName" ) === "Upload" ) { this.favicon(); this.flag( "Vitally" ); } } break; } // switch wgAction }; // .fresh() mw.libs.paneMarker.furnish = function () { // Launch paneMarker from event queue // Uses: // .fresh() // Remark: May be used as event handler -- 'this' is not accessed // 2012-06-07 [email protected] mw.libs.paneMarker.fresh(); }; // .furnish() if ( window && ! mw.libs.paneMarker.loaded ) { mw.libs.paneMarker.loaded = true; mw.loader.using( [ "user", "mediawiki.util" ], mw.libs.paneMarker.furnish ); } mw.loader.state( "ext.gadget.paneMarker", "ready" ); }( mediaWiki, jQuery ) ); // 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=137379.
![]() ![]() 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.
|