User:Irukaza/common.js

H萌娘,万物皆可H的百科全书!
< User:Irukaza
imported>=海豚=2021年8月6日 (五) 20:16的版本
跳到导航 跳到搜索

注意:这类代码页面在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • 按住CTRL+SHIFT+DEL 或 ⌘-Shift-R来清除缓存!
  • 或尝试在地址栏的地址最后添加代码?_=1来访问最新页面。
    添加代码后的本页地址如下:-{R|https://hmoegirl.com/User:Irukaza/common.js?_=1}-
  • 你还可以在设置中勾选小工具在页面右上角添加清除缓存按钮!
    $(window).scroll(function(){
        if ($(this).scrollTop() > 100) {
            $('#noteTA-lang').fadeIn();
        } else {
            $('#noteTA-lang').fadeOut();
        }
    });
 $(".noteTA-lang-changer").on("click", function(e) {
                    var uri = new mw.Uri();
                    var path = uri.path;
                    Object.keys(map).forEach(function(s) {
                        path = path.replace(new RegExp("^/" + s + "/"), "/");
                    });
                    uri.path = "/" + e.target.dataset.lang + "/" + path.replace(/^\//, "");
                    location.replace(uri);
                    $("#noteTA-lang").remove();
                }).filter('[data-lang="' + wgUserVariant + '"]').addClass("mw-ui-progressive");
                $("#noteTA-lang-explainer").on("click", function() {
                    //open(mw.config.get("wgServer") + mw.config.get("wgScriptPath") +,"_blank");
                }).hide();
                $("#noteTA-lang-disable").on("click", function() {
                    $("#noteTA-lang").remove();
                    localStorage.setItem("AnnTools-noteTA-alert", "true");
                });