您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Dismiss the annoying login request pop-up and unlock scrolling restriction while not logging in.
当前为
// ==UserScript== // @name Dcard guest popup dismiss // @name:ZH-TW Dcard 訪客瀏覽腳本 // @namespace com.sherryyue.dcardguestmode // @version 0.2 // @description Dismiss the annoying login request pop-up and unlock scrolling restriction while not logging in. // @author SherryYue // @match *://*.dcard.tw/* // @contributionURL https://sherryyuechiu.github.io/card // @supportURL [email protected] // @icon https://sherryyuechiu.github.io/card/images/logo/maskable_icon_x96.png // @grant none // ==/UserScript== (function () { 'use strict'; /** login reqquest popup * @type HTMLElement */ var $loginRequestPopup; /** if popup exsist, dismiss it. */ var loginPopupTraker = () => { $loginRequestPopup = document.querySelector(".__portal>*"); if ($loginRequestPopup) { breakRestriction(); } } /** dismiss the popup and break the scrolling restriction */ var breakRestriction = () => { // hide login reqquest popup $loginRequestPopup.style.display = "none"; // unlock scrolling restriction document.body.style.overflow = "auto"; } // detect every 2 seconds setInterval(loginPopupTraker, 2000); })();