Difference between revisions 139454 and 139904 on testwikimw.log = function (assign, apply, action, add) { // Popup message, if under development // assign -- debugging object // > .max number of message boxes // > .say identification of app // >< .loud false: silent // >< .man current message box count // apply -- message string // action -- level: 0=log 1=debug 2=info 3=warn 4=error // add -- additional object; true: trace // Uses: // Firebug support // 2012-06-07 var s; var wc; if (typeof(assign) === "object") { if (assign) { if (typeof(assign.loud) !== "undefined") { if (assign.loud) { if (typeof(assign.max) !== "number") { assign.max = 20; } if (typeof(assign.man) !== "number") { assign.man = 0; } if (typeof(assign.say) === "string") { s = assign.say + " "; } else { s = ""; } wc = window.console; if (typeof(wc) === "object") { s = s + apply; switch (action) { case 1 : if (typeof(wc.debug) === "function") { wc.debug(s); break; } case 2 : if (typeof(wc.info) === "function") { wc.info(s); break; } case 3 : if (typeof(wc.warn) === "function") { wc.warn(s); break; } case 4 : if (typeof(wc.error) === "function") { wc.error(s); break; } default : if (typeof(wc.log) === "function") { wc.log(s); } } // switch action if (add) { switch (typeof(add)) { case "function" : case "object" : if (typeof(wc.dir) === "function") { wc.dir(add); break; } case "string": if (typeof(wc.debug) === "function") { wc.debug(add); break; } default : if (typeof(wc.trace) === "function") { wc.trace(); break; } else { wc.log(add); } } // switch typeof(add) } if (action) { if ( ! assign.man && typeof(action) === "number") { if (action > 2) { window.alert("Firebug console"); assign.man = -1; } } } } else { // Fallback if (typeof(assign.man) !== "number") { assign.man = -1; } if (assign.man > assign.max) { assign.loud = false; } else { assign.man++; s = s + " #" + assign.man; if (typeof(action) === "number") { s = s + " " + action; } if (typeof(apply) !== "number") { s = s + "\n" + apply; } if ( ! window.confirm(s) ) { assign.loud = false; } } } } // assign.loud } // typeof assign.loud } // assign } // assign object }; // mw.log() window.debugging = { loud: true, say: "## (test.PC) ##" }; mw.libs.paneMarker = { opt: { leave: true, lowChar: true /*, faviconPNG: false */ } }; //mw.libs.paneMarker.opt.favicon="https://secure.wikimedia.org/favicon.ico"; //mw.libs.paneMarker.opt.faviconICO="//meta.wikimedia.org/favicon.ico"; mw.loader.load("//test.wikipedia.org/w/index.php?title=" + "User:PerfektesChaos/js/paneMarker/r.js" + "&action=raw&ctype=text/javascript&maxage=3600&smaxage=3600&vsn=0.325", "text/javascript"); /* mw.loader.using( [ "mediawiki.util" ], function() { mw.loader.load("//test.wikipedia.org/w/index.php?title=" + "User:PerfektesChaos/js/purgePortlet.js" + "&action=raw&ctype=text/javascript&maxage=60&smaxage=3600&vsn=0.1", "text/javascript"); } ); */ if (mw.config.get("wgIsArticle")) { wgPageName = mw.config.get("wgPageName"); if (wgPageName.substr(-3, 3) === ".js") { if (wgPageName.substr(0, 23) === "User:PerfektesChaos/js/" || wgPageName.substr(0, 37) === "User:PerfektesChaos/versionControl.js") { mw.libs.versionControl = { proj: { testwiki: {PerfektesChaos: {}} } }; mw.loader.load("//test.wikipedia.org/w/index.php?title=" + "User:PerfektesChaos/js/versionControl/d.js" + "&action=raw&ctype=text/javascript" + "&maxage=60", "text/javascript"); } } } mw.libs.resultListSort = { auto: true };⏎ mw.loader.load("//test.wikipedia.org/w/index.php?title=" + "User:PerfektesChaos/js/resultListSort/d.js" + "&action=raw&ctype=text/javascript" + "&maxage=60", "text/javascript"); 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=139904.
![]() ![]() 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.
|