Difference between revisions 137401 and 137402 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) c = this.config.chars; } else if ( this.heads.indexOf( this.site ) < 0 ) { c = this.config[ "char" + action ]; learn = false; } if ( c ) { if ( learn ) { c = this.config[ "char" + action ]; learn = ! c;if ( c ) { learn = false; } else { c = -1; } } if ( learn ) { switch ( action ) { case "Diff" : c = 916; // 'Δ' // '±' if not displayed by browser break; (contracted; show full) // Run paneMarker in this particular situation // Precondition: // Page may be under loading, but not necessarily ready. // .using( [ "user", "mediawiki.util" ] ) // Uses: // > .opt.* // > .config.least // > .jQuery.browser⏎ // >< this.* // < .config.* // < .site // < .nsN // < .lazy // .flip() // .flag() // .favicon() // mw.config.get() // mw.util.getParamValue() // 2012-06-13 [email protected] if ( typeof this.opt === "object" && this.opt ) { this.config = this.opt; } else { this.config = { }; } this.site = mw.config.get( "wgDBname" ); this.nsN = mw.config.get( "wgNamespaceNumber" ); this.flip(); switch ( mw.config.get( "wgAction" ) ) { case "edit" : case "submit" :⏎ if ( jQuery.browser ) { if ( jQuery.browser.msie ) { if ( jQuery.browser.version < 910 ) { this.lazy = true; }⏎ } }⏎ } }switch ( mw.config.get( "wgAction" ) ) { case "edit" : case "submit" : if ( ! this.lazy ) { this.favicon(); } this.flag( "Vitally" ); break; case "history" : this.flag( "History" ); break; case "view" : if ( mw.util.getParamValue( "diff" ) !== null ) { this.flag( "Diff" ); } else if ( this.nsN === -1 ) { if ( mw.config.get( "wgCanonicalSpecialPageName" ) === "Upload" ) { this.favicon();if ( ! this.lazy ) { 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=137402.
![]() ![]() 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.
|