BDImg jump2.bdimg.com重定向到百度贴吧tieba.baidu.com

访问 jump2.bdimg.com 时自动重定向到 tieba.baidu.com

  1. // ==UserScript==
  2. // @name BDImg jump2.bdimg.com重定向到百度贴吧tieba.baidu.com
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description 访问 jump2.bdimg.com 时自动重定向到 tieba.baidu.com
  6. // @author life9211
  7. // @match https://jump2.bdimg.com/*
  8. // @match https://jump.bdimg.com/*
  9. // @license MIT
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // 获取当前URL
  17. const currentUrl = window.location.href;
  18.  
  19. // 创建新的URL对象
  20. const url = new URL(currentUrl);
  21.  
  22. // 修改主机名
  23. url.hostname = 'tieba.baidu.com';
  24.  
  25. // 添加延迟后重定向
  26. setTimeout(() => {
  27. window.location.replace(url.toString());
  28. }, 1000);// 1秒延迟,可以根据需要调整
  29. })();

QingJ © 2025

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