检测特定URL1428

当当前 URL 为指定 URL 时,在控制台打印消息

  1. // ==UserScript==
  2. // @name 检测特定URL1428
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.3
  5. // @description 当当前 URL 为指定 URL 时,在控制台打印消息
  6. // @author 脚大江山稳
  7. // @match *://*/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. const targetUrl = 'APP_Z82AEPBKQ1064V6QHJEO';
  15. console.log(window.location.href);
  16. function checkUrl() {
  17. if (window.location.href.includes (targetUrl)) {
  18. console.log(window.location.href);
  19. console.log('检测到了');
  20. var style = document.createElement('style');
  21. style.type = 'text/css';
  22. style.innerHTML = '.vc-text.fn-hide { display: inherit !important; }';
  23. document.head.appendChild(style);
  24. }
  25. }
  26.  
  27. checkUrl();
  28. })();

QingJ © 2025

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