Jump to content
Wikimedia Meta-Wiki

User:He7d3r/Tools/DebugModeToggle.js: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
m Sync with https://github.com/he7d3r/mw-gadget-DebugModeToggle; minify with UgliPyJS 0.2.5
m Sync with https://github.com/he7d3r/mw-gadget-DebugModeToggle; minify with UgliPyJS 0.2.5
Line 6: Line 6:
*/
*/
// <nowiki>
// <nowiki>
(function(e,o){"use strict";function a(o){var a(削除) =location.search.indexOf("?")===-1?"?":"&" (削除ここまで);o.preventDefault(),e.cookie.set("resourceLoaderDebug",n===0?null:!0,{expires:86400,path:"/"}),(削除) location.href (削除ここまで)=location.href.replace(location.hash,"").replace(/[&?]debug(=[^&]*)?/g,"")(削除) + (削除ここまで)a+"debug="+!n}function i(){var i="ca-toggle-debug-mode",(削除) t (削除ここまで)={1:"Disable debug mode",0:"Enable debug mode"};o("#"+i).length||o(e.util.addPortletLink("p-tb","#",(削除) t (削除ここまで)[n],i,"Turn debug mode on or off and reload the page")).click(a).find("a").css("color","#808")}var n=e.config.get("debug");o.when(e.loader.using("mediawiki.util"),o.ready).then(i)})(mediaWiki,jQuery);
(function(e,o){"use strict";function a(o){var a(追記) ,i (追記ここまで);o.preventDefault(),e.cookie.set("resourceLoaderDebug",n===0?null:!0,{expires:86400,path:"/"}),(追記) a (追記ここまで)=location.href.replace(location.hash,"").replace(/[&?]debug(=[^&]*)?/g,"")(追記) ,i= (追記ここまで)a(追記) .indexOf("?")===-1?"?":"&",location.href=a+i (追記ここまで)+"debug="+!n}function i(){var i="ca-toggle-debug-mode",(追記) d (追記ここまで)={1:"Disable debug mode",0:"Enable debug mode"};o("#"+i).length||o(e.util.addPortletLink("p-tb","#",(追記) d (追記ここまで)[n],i,"Turn debug mode on or off and reload the page")).click(a).find("a").css("color","#808")}var n=e.config.get("debug");o.when(e.loader.using("mediawiki.util"),o.ready).then(i)})(mediaWiki,jQuery);
// </nowiki>
// </nowiki>

Latest revision as of 19:51, 2 March 2024

 // [[File:User:He7d3r/Tools/DebugModeToggle.js]] (workaround for [[phab:T35355]])
 /**
  * Add a toggle for debug mode to the sidebar
  * @author: Helder (https://github.com/he7d3r)
  * @license: CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0/>
  */
 // <nowiki>
 (function(e,o){"use strict";functiona(o){vara,i;o.preventDefault(),e.cookie.set("resourceLoaderDebug",n===0?null:!0,{expires:86400,path:"/"}),a=location.href.replace(location.hash,"").replace(/[&?]debug(=[^&]*)?/g,""),i=a.indexOf("?")===-1?"?":"&",location.href=a+i+"debug="+!n}functioni(){vari="ca-toggle-debug-mode",d={1:"Disable debug mode",0:"Enable debug mode"};o("#"+i).length||o(e.util.addPortletLink("p-tb","#",d[n],i,"Turn debug mode on or off and reload the page")).click(a).find("a").css("color","#808")}varn=e.config.get("debug");o.when(e.loader.using("mediawiki.util"),o.ready).then(i)})(mediaWiki,jQuery);
 // </nowiki>

AltStyle によって変換されたページ (->オリジナル) /