秘塔AI

https://metaso.cn/

分享者: Atosdne (8011)发布时间: 2024/09/26

该用户很懒,什么介绍也没有写!
二维码导入
{
    "articleStyle": 0,
    "customOrder": 0,
    "enableJs": true,
    "enabled": true,
    "enabledCookieJar": true,
    "header": "{\n\"User-Agent\": \"Mozilla\/5.0 (Linux; Android 14; 23124RN87C Build\/UP1A.231005.007) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/120.0.6099.193 Mobile Safari\/537.36\"\n}",
    "injectJs": "\/\/ ==UserScript==\n\/\/ @name              网页加速器\n\/\/ @namespace         https:\/\/github.com\/Gao-Lezhe\/instantpage\n\/\/ @version           1.0.3\n\/\/ @author            YouXiaoHou、高乐喆(Greasy Fork用户名:lezhe)\n\/\/ @description       自动帮你加速网页中的超链接,加快打开网页的速度,实测符合条件的网页打开速度减少50%以上。\n\/\/ @license           AGPL\n\/\/ @supportURL        https:\/\/github.com\/Gao-Lezhe\/instantpage\n\/\/ @require           https:\/\/registry.npmmirror.com\/sweetalert2\/10.16.6\/files\/dist\/sweetalert2.min.js\n\/\/ @resource          swalStyle https:\/\/registry.npmmirror.com\/sweetalert2\/10.16.6\/files\/dist\/sweetalert2.min.css\n\/\/ @match             *:\/\/*\/*\n\/\/ @noframes\n\/\/ @run-at            document-idle\n\/\/ @grant             GM_openInTab\n\/\/ @grant             GM_setValue\n\/\/ @grant             GM_getValue\n\/\/ @grant             GM_registerMenuCommand\n\/\/ @grant             GM_getResourceText\n\/\/ @icon              data:image\/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48cGF0aCBkPSJNMCA3OWMwLTM1LjQgMjguNS02NCA2My45LTY0LjFzNjQuMSAyOC42IDY0LjEgNjRjMCA5LjQtMi4xIDE4LjQtNS43IDI2LjUtMSAyLjMtMi4zIDQuNi0zLjYgNi43LS40LjYtMSAxLTEuNyAxSDExYy0uNyAwLTEuMy0uNC0xLjctMS0xLjMtMi4yLTIuNS00LjQtMy42LTYuN0MyLjEgOTcuNCAwIDg4LjQgMCA3OXptMjQuNC0zOS43Yy01LjIgNS4xLTkuMiAxMS4xLTEyIDE3LjgtMyA2LjktNC41IDE0LjItNC41IDIxLjhhNTUuODYgNTUuODYgMCAwIDAgNC40IDIxLjhjLjcgMS42IDEuNCAzLjIgMi4yIDQuN2g5OC44Yy44LTEuNSAxLjYtMy4xIDIuMi00LjdhNTUuODYgNTUuODYgMCAwIDAgNC40LTIxLjggNTUuODYgNTUuODYgMCAwIDAtNC40LTIxLjhjLTIuOC02LjctNi45LTEyLjctMTItMTcuOC01LjEtNS4yLTExLjEtOS4yLTE3LjgtMTJhNTUuODYgNTUuODYgMCAwIDAtMjEuOC00LjQgNTUuODYgNTUuODYgMCAwIDAtMjEuOCA0LjRjLTYuNiAyLjgtMTIuNiA2LjgtMTcuNyAxMnoiIGZpbGw9IiM0NDQiLz48cGF0aCBkPSJNMTIuNCA1Ny4xYzIuOC02LjcgNi45LTEyLjcgMTItMTcuOCA1LjEtNS4yIDExLjEtOS4yIDE3LjgtMTJBNTUuODYgNTUuODYgMCAwIDEgNjQgMjIuOWE1NS44NiA1NS44NiAwIDAgMSAyMS44IDQuNGM2LjcgMi44IDEyLjcgNi45IDE3LjggMTIgNS4yIDUuMSA5LjIgMTEuMSAxMiAxNy44YTU1Ljg2IDU1Ljg2IDAgMCAxIDQuNCAyMS44IDU1Ljg2IDU1Ljg2IDAgMCAxLTQuNCAyMS44Yy0uNyAxLjYtMS40IDMuMi0yLjIgNC43SDE0LjZjLS44LTEuNS0xLjYtMy4xLTIuMi00LjdBNTUuODYgNTUuODYgMCAwIDEgOCA3OC45Yy0uMS03LjYgMS40LTE0LjkgNC40LTIxLjh6IiBmaWxsPSIjNjQ5OTUwIi8+PHBhdGggZD0iTTc3LjUgNjAuOUM2OCA4MS4yIDY0LjkgODQuNiA2NC42IDg1Yy0xLjUgMS41LTMuNSAyLjMtNS42IDIuM3MtNC4xLS44LTUuNi0yLjNhNy45MSA3LjkxIDAgMCAxIDAtMTEuMmMuMy0uNCAzLjgtMy40IDI0LjEtMTIuOXptMC04Yy0xLjEgMC0yLjMuMi0zLjQuOEM2My4yIDU4LjggNTEgNjQuOSA0Ny44IDY4LjFjLTYuMiA2LjItNi4yIDE2LjMgMCAyMi41IDMuMSAzLjEgNy4yIDQuNyAxMS4yIDQuN3M4LjEtMS42IDExLjItNC43YzMuMi0zLjIgOS4zLTE1LjQgMTQuNC0yNi4zIDIuNi01LjYtMS43LTExLjQtNy4xLTExLjR6TTYzLjkgMjkuOGMtMjcuMiAwLTQ5LjUgMjIuNi00OS4xIDQ5LjggMCAzLjYuNSA3LjIgMS4zIDEwLjYuNCAxLjggMiAzLjEgMy45IDMuMSAyLjYgMCA0LjQtMi40IDMuOS00LjktLjctMy0xLjEtNi4yLTEuMS05LjNBNDIuMDQgNDIuMDQgMCAwIDEgMjYgNjNjMi01IDUtOS40IDguOC0xMy4yUzQzIDQzLjEgNDcuOSA0MWE0Mi4wNCA0Mi4wNCAwIDAgMSAzMi4yIDBjNC45IDIuMSA5LjMgNS4xIDEzLjEgOC45Qzk3IDUzLjYgOTkuOSA1OCAxMDIgNjNhNDIuMDQgNDIuMDQgMCAwIDEgMy4yIDE2LjFjMCAzLjItLjQgNi4zLTEuMSA5LjMtLjYgMi41IDEuMyA0LjkgMy45IDQuOSAxLjggMCAzLjUtMS4zIDMuOS0zLjEuOC0zLjYgMS4zLTcuMyAxLjMtMTEuMSAwLTI3LjMtMjIuMS00OS4zLTQ5LjMtNDkuM3oiIGZpbGw9IiM0NDQiLz48L3N2Zz4=\n\/\/ @downloadURL https:\/\/update.greasyfork.org\/scripts\/487625\/%E7%BD%91%E9%A1%B5%E5%8A%A0%E9%80%9F%E5%99%A8.user.js\n\/\/ @updateURL https:\/\/update.greasyfork.org\/scripts\/487625\/%E7%BD%91%E9%A1%B5%E5%8A%A0%E9%80%9F%E5%99%A8.meta.js\n\/\/ ==\/UserScript==\n\n(function () {\n    'use strict';\n\n    let util = {\n        getValue(name) {\n            return GM_getValue(name);\n        },\n\n        setValue(name, value) {\n            GM_setValue(name, value);\n        },\n\n        include(str, arr) {\n            str = str.replace(\/[-_]\/ig, '');\n            for (let i = 0, l = arr.length; i < l; i++) {\n                let val = arr[i];\n                if (val !== '' && str.toLowerCase().indexOf(val.toLowerCase()) > -1) {\n                    return true;\n                }\n            }\n            return false;\n        },\n\n        addStyle(id, tag, css) {\n            tag = tag || 'style';\n            let doc = document, styleDom = doc.getElementById(id);\n            if (styleDom) return;\n            let style = doc.createElement(tag);\n            style.rel = 'stylesheet';\n            style.id = id;\n            tag === 'style' ? style.innerHTML = css : style.href = css;\n            doc.head.appendChild(style);\n        },\n\n        reg: {\n            chrome: \/^https?:\\\/\\\/chrome.google.com\\\/webstore\\\/.+?\\\/([a-z]{32})(?=[\\\/#?]|$)\/,\n            chromeNew: \/^https?:\\\/\\\/chromewebstore.google.com\\\/.+?\\\/([a-z]{32})(?=[\\\/#?]|$)\/,\n            edge: \/^https?:\\\/\\\/microsoftedge.microsoft.com\\\/addons\\\/.+?\\\/([a-z]{32})(?=[\\\/#?]|$)\/,\n            firefox: \/^https?:\\\/\\\/(reviewers\\.)?(addons\\.mozilla\\.org|addons(?:-dev)?\\.allizom\\.org)\\\/.*?(?:addon|review)\\\/([^\/<>\"'?#]+)\/,\n            microsoft: \/^https?:\\\/\\\/(?:apps|www).microsoft.com\\\/(?:store|p)\\\/.+?\\\/([a-zA-Z\\d]{10,})(?=[\\\/#?]|$)\/,\n        }\n    };\n\n    let main = {\n        initValue() {\n            let value = [{\n                name: 'setting_success_times',\n                value: 0\n            }, {\n                name: 'allow_external_links',\n                value: true\n            }, {\n                name: 'allow_query_links',\n                value: true\n            }, {\n                name: 'enable_store_link',\n                value: true\n            }, {\n                name: 'enable_target_self',\n                value: false\n            }, {\n                name: 'enable_animation',\n                value: false\n            }, {\n                name: 'delay_on_hover',\n                value: 65\n            }, {\n                name: 'exclude_list',\n                value: ''\n            }, {\n                name: 'exclude_keyword',\n                value: 'login\\nlogout\\nregister\\nsignin\\nsignup\\nsignout\\npay\\ncreate\\nedit\\ndownload\\ndel\\nreset\\nsubmit\\ndoubleclick\\ngoogleads\\nexit'\n            }];\n\n            value.forEach((v) => {\n                util.getValue(v.name) === undefined && util.setValue(v.name, v.value);\n            });\n        },\n\n        registerMenuCommand() {\n            GM_registerMenuCommand('🚀 已加速:' + util.getValue('setting_success_times') + '次', () => {\n                Swal.fire({\n                    showCancelButton: true,\n                    title: '确定要重置加速次数吗?',\n                    icon: 'warning',\n                    confirmButtonText: '确定',\n                    cancelButtonText: '取消',\n                    customClass: {\n                        popup: 'instant-popup',\n                    },\n                }).then((res) => {\n                    if (res.isConfirmed) {\n                        util.setValue('setting_success_times', 0);\n                        history.go(0);\n                    }\n                });\n            });\n            GM_registerMenuCommand('⚙️ 设置', () => {\n                let dom = `<div style=\"font-size: 1em;\">\n                              <label class=\"instant-setting-label\">加速外部链接<input type=\"checkbox\" id=\"S-External\" ${util.getValue('allow_external_links') ? 'checked' : ''} class=\"instant-setting-checkbox\"><\/label>\n                              <label class=\"instant-setting-label\"><span>加速含参数链接 <a href=\"https:\/\/www.youxiaohou.com\/tool\/install-instantpage.html#%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E\">详见<\/a><\/span><input type=\"checkbox\" id=\"S-Query\" ${util.getValue('allow_query_links') ? 'checked' : ''} \n                              class=\"instant-setting-checkbox\"><\/label>\n                              <label class=\"instant-setting-label\">加速扩展商店链接<input type=\"checkbox\" id=\"S-Store\" ${util.getValue('enable_store_link') ? 'checked' : ''} class=\"instant-setting-checkbox\"><\/label>\n                              <label class=\"instant-setting-label\">加速链接在当前页打开<input type=\"checkbox\" id=\"S-Target\" ${util.getValue('enable_target_self') ? 'checked' : ''} class=\"instant-setting-checkbox\"><\/label>\n                              <label class=\"instant-setting-label\">加速动画效果<input type=\"checkbox\" id=\"S-Animate\" ${util.getValue('enable_animation') ? 'checked' : ''} \n                              class=\"instant-setting-checkbox\"><\/label>\n                              <label class=\"instant-setting-label\">链接预读延时(毫秒)<input type=\"number\" min=\"65\" id=\"S-Delay\" value=\"${util.getValue('delay_on_hover')}\" \n                              class=\"instant-setting-input\"><\/label>\n                              <label class=\"instant-setting-label-col\">排除下列网址 <textarea placeholder=\"列表中的域名将不开启加速器,一行一个,例如:www.baidu.com\" id=\"S-Exclude\" class=\"instant-setting-textarea\">${util.getValue('exclude_list')}<\/textarea><\/label>\n                              <label class=\"instant-setting-label-col\">排除下列关键词 <textarea placeholder=\"链接中含关键词将不开启加速器,一行一个,例如:logout\" id=\"S-Exclude-Word\" class=\"instant-setting-textarea\">${util.getValue('exclude_keyword')}<\/textarea><\/label>\n                            <\/div>`;\n                Swal.fire({\n                    title: '加速器配置',\n                    html: dom,\n                    showCloseButton: true,\n                    confirmButtonText: '保存',\n                    footer: '<div style=\"text-align: center;font-size: 1em;\">点击查看 <a href=\"https:\/\/www.youxiaohou.com\/tool\/install-instantpage.html\" target=\"_blank\">使用说明<\/a>,助手免费开源,Powered by <a href=\"https:\/\/www.youxiaohou.com\">油小猴<\/a><\/div>',\n                    customClass: {\n                        popup: 'instant-popup',\n                    },\n                }).then((res) => {\n                    if (res.isConfirmed) {\n                        history.go(0);\n                    }\n                });\n\n                document.getElementById('S-External').addEventListener('change', (e) => {\n                    util.setValue('allow_external_links', e.currentTarget.checked);\n                });\n                document.getElementById('S-Query').addEventListener('change', (e) => {\n                    util.setValue('allow_query_links', e.currentTarget.checked);\n                });\n                document.getElementById('S-Store').addEventListener('change', (e) => {\n                    util.setValue('enable_store_link', e.currentTarget.checked);\n                });\n                document.getElementById('S-Target').addEventListener('change', (e) => {\n                    util.setValue('enable_target_self', e.currentTarget.checked);\n                });\n                document.getElementById('S-Animate').addEventListener('change', (e) => {\n                    util.setValue('enable_animation', e.currentTarget.checked);\n                });\n                document.getElementById('S-Delay').addEventListener('change', (e) => {\n                    util.setValue('delay_on_hover', e.currentTarget.value);\n                });\n                document.getElementById('S-Exclude').addEventListener('change', (e) => {\n                    util.setValue('exclude_list', e.currentTarget.value);\n                });\n                document.getElementById('S-Exclude-Word').addEventListener('change', (e) => {\n                    util.setValue('exclude_keyword', e.currentTarget.value);\n                });\n            });\n        },\n\n        \/\/在排除名单里\n        inExcludeList() {\n            let exclude = util.getValue('exclude_list').split('\\n');\n            let host = location.host;\n            return exclude.includes(host);\n        },\n\n        \/\/加速主代码\n        instantPage() {\n            if (window.instantLoaded) return;\n            let mouseoverTimer;\n            let lastTouchTimestamp;\n            const prefetches = new Set();\n            const prefetchElement = document.createElement('link');\n            const isSupported = prefetchElement.relList && prefetchElement.relList.supports && prefetchElement.relList.supports('prefetch')\n                && window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype;\n            const isOnline = () => window.navigator.onLine;\n            const allowQueryString = 'instantAllowQueryString' in document.body.dataset || util.getValue('allow_query_links');\n            const allowExternalLinks = 'instantAllowExternalLinks' in document.body.dataset || util.getValue('allow_external_links');\n            const useWhitelist = 'instantWhitelist' in document.body.dataset;\n            const mousedownShortcut = 'instantMousedownShortcut' in document.body.dataset;\n            const DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION = 1111;\n            const enableAnimation = util.getValue('enable_animation');\n            const enableTargetSelf = util.getValue('enable_target_self');\n            const enableStoreLink = util.getValue('enable_store_link');\n            window.instantLoaded = true;\n            const excludeKeyword = util.getValue('exclude_keyword').split('\\n');\n\n            let delayOnHover = util.getValue('delay_on_hover');\n            let useMousedown = false;\n            let useMousedownOnly = false;\n            let useViewport = false;\n\n            if ('instantIntensity' in document.body.dataset) {\n                const intensity = document.body.dataset.instantIntensity;\n\n                if (intensity.substr(0, 'mousedown'.length) === 'mousedown') {\n                    useMousedown = true;\n                    if (intensity === 'mousedown-only') {\n                        useMousedownOnly = true;\n                    }\n                } else if (intensity.substr(0, 'viewport'.length) === 'viewport') {\n                    if (!(navigator.connection && (navigator.connection.saveData || (navigator.connection.effectiveType && navigator.connection.effectiveType.includes('2g'))))) {\n                        if (intensity === \"viewport\") {\n                            if (document.documentElement.clientWidth * document.documentElement.clientHeight < 450000) {\n                                useViewport = true;\n                            }\n                        } else if (intensity === \"viewport-all\") {\n                            useViewport = true;\n                        }\n                    }\n                } else {\n                    const milliseconds = parseInt(intensity);\n                    if (!Number.isNaN(milliseconds)) {\n                        delayOnHover = milliseconds;\n                    }\n                }\n            }\n\n            if (isSupported) {\n                const eventListenersOptions = {\n                    capture: true,\n                    passive: true,\n                };\n\n                if (!useMousedownOnly) {\n                    document.addEventListener('touchstart', touchstartListener, eventListenersOptions);\n                }\n\n                if (!useMousedown) {\n                    document.addEventListener('mouseover', mouseoverListener, eventListenersOptions);\n                } else if (!mousedownShortcut) {\n                    document.addEventListener('mousedown', mousedownListener, eventListenersOptions);\n                }\n\n                if (mousedownShortcut) {\n                    document.addEventListener('mousedown', mousedownShortcutListener, eventListenersOptions);\n                }\n\n\n                if (useViewport) {\n                    let triggeringFunction;\n                    if (window.requestIdleCallback) {\n                        triggeringFunction = (callback) => {\n                            requestIdleCallback(callback, {\n                                timeout: 1500,\n                            });\n                        };\n                    } else {\n                        triggeringFunction = (callback) => {\n                            callback();\n                        };\n                    }\n\n                    triggeringFunction(() => {\n                        const intersectionObserver = new IntersectionObserver((entries) => {\n                            entries.forEach((entry) => {\n                                if (entry.isIntersecting) {\n                                    const linkElement = entry.target;\n                                    intersectionObserver.unobserve(linkElement);\n                                    preload(linkElement);\n                                }\n                            });\n                        });\n\n                        document.querySelectorAll('a').forEach((linkElement) => {\n                            if (isPreloadable(linkElement)) {\n                                intersectionObserver.observe(linkElement);\n                            }\n                        });\n                    });\n                }\n            }\n\n            function touchstartListener(event) {\n                \/* Chrome on Android calls mouseover before touchcancel so `lastTouchTimestamp`\n                 * must be assigned on touchstart to be measured on mouseover. *\/\n                lastTouchTimestamp = performance.now();\n\n                const linkElement = event.target.closest('a');\n\n                if (!isPreloadable(linkElement)) {\n                    return;\n                }\n\n                preload(linkElement);\n            }\n\n            function mouseoverListener(event) {\n                if (performance.now() - lastTouchTimestamp < DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION) {\n                    return;\n                }\n\n                if (!('closest' in event.target)) {\n                    \/\/ Without this check sometimes an error “event.target.closest is not a function” is thrown, for unknown reasons\n                    \/\/ That error denotes that `event.target` isn’t undefined. My best guess is that it’s the Document.\n\n                    \/\/ Details could be gleaned from throwing such an error:\n                    \/\/throw new TypeError(`instant.page non-element event target: timeStamp=${~~event.timeStamp}, type=${event.type}, typeof=${typeof event.target}, nodeType=${event.target.nodeType}, nodeName=${event.target.nodeName}, viewport=${innerWidth}x${innerHeight}, coords=${event.clientX}x${event.clientY}, scroll=${scrollX}x${scrollY}`)\n                    return\n                }\n\n                const linkElement = event.target.closest('a');\n\n                if (!isPreloadable(linkElement)) {\n                    return;\n                }\n\n                linkElement.addEventListener('mouseout', mouseoutListener, {passive: true});\n\n                mouseoverTimer = setTimeout(() => {\n                    preload(linkElement);\n                    mouseoverTimer = undefined;\n                }, delayOnHover);\n            }\n\n            function mousedownListener(event) {\n                const linkElement = event.target.closest('a');\n\n                if (!isPreloadable(linkElement)) {\n                    return;\n                }\n\n                preload(linkElement);\n            }\n\n            function mouseoutListener(event) {\n                if (event.relatedTarget && event.target.closest('a') === event.relatedTarget.closest('a')) {\n                    return;\n                }\n\n                if (mouseoverTimer) {\n                    clearTimeout(mouseoverTimer);\n                    mouseoverTimer = undefined;\n                }\n            }\n\n            function mousedownShortcutListener(event) {\n                if (performance.now() - lastTouchTimestamp < DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION) {\n                    return;\n                }\n\n                const linkElement = event.target.closest('a');\n\n                if (event.which > 1 || event.metaKey || event.ctrlKey) {\n                    return;\n                }\n\n                if (!linkElement) {\n                    return;\n                }\n\n                linkElement.addEventListener('click', function (event) {\n                    if (event.detail === 1337) {\n                        return;\n                    }\n\n                    event.preventDefault();\n                }, {capture: true, passive: false, once: true});\n\n                const customEvent = new MouseEvent('click', {\n                    view: window,\n                    bubbles: true,\n                    cancelable: true,\n                    detail: 1337\n                });\n                linkElement.dispatchEvent(customEvent);\n            }\n\n            function isPreloadable(linkElement) {\n                if (!linkElement || !linkElement.href) {\n                    return;\n                }\n\n                if (util.include(linkElement.href, excludeKeyword)) {\n                    if (!util.reg.chrome.test(linkElement.href) &&\n                        !util.reg.chromeNew.test(linkElement.href) &&\n                        !util.reg.edge.test(linkElement.href) &&\n                        !util.reg.edge.test(linkElement.href) &&\n                        !util.reg.microsoft.test(linkElement.href)) {\n                        return;\n                    }\n                }\n\n                if (useWhitelist && !('instant' in linkElement.dataset)) {\n                    return;\n                }\n\n                if (!allowExternalLinks && linkElement.origin !== location.origin && !('instant' in linkElement.dataset)) {\n                    return;\n                }\n\n                if (!['http:', 'https:'].includes(linkElement.protocol)) {\n                    return;\n                }\n\n                if (linkElement.protocol === 'http:' && location.protocol === 'https:') {\n                    if (linkElement.href.indexOf('http:\/\/www.baidu.com\/link?url') === 0) {\n                        linkElement.href = linkElement.href.replace('http', 'https');\n                    } else {\n                        return;\n                    }\n                }\n                \/\/下载文件不加速\n                if (\/\\.[a-zA-Z0-9]{0,5}$\/i.test(linkElement.href)) {\n                    \/\/排除域名,网站扩展名\n                    if (!\/(com|cn|top|ltd|net|tech|shop|vip|xyz|wang|cloud|online|site|love|art|xin|store|fun|cc|website|press|space|beer|luxe|video|ren|group|fit|yoga|org|pro|ink|biz|info|design|link|work|mobi|kim|pub|name|tv|co|asia|red|live|wiki|gov|life|world|run|show|city|gold|today|plus|cool|icu|company|chat|zone|fans|law|host|center|club|email|fund|social|team|guru|htm|html|php|asp|jsp)$\/i.test(linkElement.href)) {\n                        return;\n                    }\n                }\n\n                if (!allowQueryString && linkElement.search && !('instant' in linkElement.dataset)) {\n                    return;\n                }\n\n                if (linkElement.hash && linkElement.pathname + linkElement.search === location.pathname + location.search) {\n                    return;\n                }\n\n                if (linkElement.dataset.filename || linkElement.dataset.noInstant) {\n                    return;\n                }\n\n                return true;\n            }\n\n            function preload(linkElement) {\n                let url = linkElement.href;\n\n                if (!isOnline()) {\n                    return;\n                }\n\n                if (prefetches.has(url)) {\n                    return;\n                }\n\n                if (enableStoreLink) {\n                    if (util.reg.chromeNew.test(url)) {\n                        linkElement.href = url.replace(\"chromewebstore.google.com\", \"chrome.crxsoso.com\/webstore\");\n                    }\n                    if (util.reg.edge.test(url)) {\n                        linkElement.href = url.replace(\"microsoftedge.microsoft.com\", \"microsoftedge.crxsoso.com\");\n                    }\n                    if (util.reg.firefox.test(url)) {\n                        linkElement.href = url.replace(\"addons.mozilla.org\", \"addons.crxsoso.com\");\n                    }\n                }\n\n                const prefetcher = document.createElement('link');\n                prefetcher.rel = 'prefetch';\n                prefetcher.href = url;\n                document.head.appendChild(prefetcher);\n\n                prefetches.add(url);\n\n                if (enableAnimation) {\n                    linkElement.classList.add(\"link-instanted\");\n                }\n                if (enableTargetSelf) {\n                    linkElement.target = '_self';\n                }\n\n                util.setValue('setting_success_times', util.getValue('setting_success_times') + 1);\n            }\n        },\n\n        addPluginStyle() {\n            let style = `\n                .instant-popup { font-size: 14px !important; }\n                .instant-setting-label { display: flex;align-items: center;justify-content: space-between;padding-top: 15px; }\n                .instant-setting-label-col { display: flex;align-items: flex-start;;padding-top: 15px;flex-direction:column }\n                .instant-setting-checkbox { width: 16px;height: 16px; }\n                .instant-setting-textarea { width: 100%; margin: 14px 0 0; height: 60px; resize: none; border: 1px solid #bbb; box-sizing: border-box; padding: 5px 10px; border-radius: 5px; color: #666; line-height: 1.2; }\n                .instant-setting-input { border: 1px solid #bbb; box-sizing: border-box; padding: 5px 10px; border-radius: 5px; width: 100px}\n                 @keyframes instantAnminate { from { opacity: 1; } 50% { opacity: 0.4 } to { opacity: 0.9; }}\n                .link-instanted { animation: instantAnminate 0.6s 1; animation-fill-mode:forwards }\n                .link-instanted * { animation: instantAnminate 0.6s 1; animation-fill-mode:forwards }\n            `;\n\n            if (document.head) {\n                util.addStyle('swal-pub-style', 'style', GM_getResourceText('swalStyle'));\n                util.addStyle('instant-style', 'style', style);\n            }\n\n            const headObserver = new MutationObserver(() => {\n                util.addStyle('swal-pub-style', 'style', GM_getResourceText('swalStyle'));\n                util.addStyle('instant-style', 'style', style);\n            });\n            headObserver.observe(document.head, {childList: true, subtree: true});\n        },\n\n        init() {\n            this.initValue();\n            this.addPluginStyle();\n            this.registerMenuCommand();\n            if (this.inExcludeList()) return;\n            this.instantPage();\n        }\n    };\n    main.init();\n})();",
    "lastUpdateTime": 0,
    "loadWithBaseUrl": true,
    "singleUrl": true,
    "sourceGroup": "AI",
    "sourceIcon": "https:\/\/metaso.cn\/favicon.ico",
    "sourceName": "秘塔AI",
    "sourceUrl": "https:\/\/metaso.cn\/"
}
广告