Fuck重定向

屏蔽链接自动跳转,目前支持QQ

  1. // ==UserScript==
  2. // @name Fuck重定向
  3. // @namespace https://github.com/Ahaochan/Tampermonkey
  4. // @version 0.0.2
  5. // @description 屏蔽链接自动跳转,目前支持QQ
  6. // @author Ahaochan
  7. // @include http*://c.pc.qq.com/middlem.html?pfurl=*
  8. // @license GPL-3.0
  9. // @supportURL https://github.com/Ahaochan/Tampermonkey
  10. // @require https://cdn.bootcdn.net/ajax/libs/jquery/2.2.4/jquery.min.js
  11. // @run-at document-end
  12. // ==/UserScript==
  13.  
  14. (function ($) {
  15. 'use strict';
  16. const url = location.href;
  17.  
  18. const urlObject = new URL(url);
  19. const params = new URLSearchParams(urlObject.search);
  20.  
  21. // QQ屏蔽
  22. const pfurl = params.get('pfurl');
  23. if (pfurl) {
  24. location.href = decodeURIComponent(pfurl);
  25. }
  26. })(jQuery);