Dcard Guest

簡單移除Dcard在未登入狀態下的註冊視窗及禁止捲動

目前为 2023-04-24 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Dcard Guest
  3. // @namespace snkoarashi_dcard
  4. // @version 1.2
  5. // @description 簡單移除Dcard在未登入狀態下的註冊視窗及禁止捲動
  6. // @author SN-Koarashi (5026)
  7. // @match https://*.dcard.tw/*
  8. // @icon https://www.google.com/s2/favicons?domain=dcard.tw
  9. // @grant GM_setValue
  10. // @grant GM_getValue
  11. // @require https://code.jquery.com/jquery-3.5.1.min.js
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. var dialog = false;
  17. var oldURL = location.href;
  18. var $ = window.jQuery;
  19.  
  20. // Main Timer
  21. var timer = setInterval(function(){
  22. $(".__portal").remove();
  23. $("body").css("overflow","");
  24.  
  25. let re = /^(https:\/\/www.dcard.tw\/)(.*?)\/p\/([0-9]+)/g;
  26. let URLs = location.href;
  27. if(URLs.match(re)){
  28. if (location.href != oldURL){
  29. oldURL = location.href;
  30. location.reload(true);
  31. }
  32. }
  33.  
  34.  
  35. oldURL = location.href;
  36. },500);
  37. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址