baidu no jump

去除百度搜索跳转链接

  1. // ==UserScript==
  2. // @name baidu no jump
  3. // @namespace 1018148046
  4. // @description 去除百度搜索跳转链接
  5. // @include http://www.baidu.com/*
  6. // @include https://www.baidu.com/*
  7. // @version 1.0
  8. // @grant GM_xmlhttpRequest
  9. // @run-at document-start
  10. // ==/UserScript==
  11. //http://bbs.kafan.cn/forum.php?mod=viewthread&tid=1865907&page=12#pid38794320
  12. (D => {
  13. let addcss = () => D.head.appendChild(D.createElement('style')).innerHTML = `.t a[href*="http://www.baidu.com/link?url="]{animation:baidu 1ms}@keyframes baidu{from{opacity:.9;}to{opacity:1}}`;
  14. D.addEventListener('DOMContentLoaded', () => new MutationObserver(() => addcss()).observe(D.body, {childList: true}), false);
  15. D.addEventListener('animationstart', e => {
  16. if (e.animationName !== 'baidu') return;
  17. let ele = e.target, curhref = ele.href;
  18. GM_xmlhttpRequest({url: curhref, method: "HEAD", onload: e => ele.href = e.finalUrl});
  19. }, false)
  20. })(document);

QingJ © 2025

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