FuckQQ

拦你妈呢死妈 QQ 管家

  1. // ==UserScript==
  2. // @name FuckQQ
  3. // @namespace https://github.com/Cierra-Runis/FuckQQ
  4. // @version 1.2
  5. // @description 拦你妈呢死妈 QQ 管家
  6. // @connect raw.githubusercontent.com
  7. // @connect github.com
  8. // @connect cdn.jsdelivr.net
  9. // @author https://github.com/Cierra-Runis
  10. // @match https://c.pc.qq.com/*
  11. // @icon https://raw.githubusercontent.com/Cierra-Runis/FuckQQ/master/.github/icon.png
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. "use strict";
  17. let urlBlock = document.getElementById("url");
  18.  
  19. const getQuery = (url, query) => {
  20. const str = url.substr(url.indexOf("?") + 1);
  21. const arr = str.split("&");
  22. const result = {};
  23. for (let i = 0; i < arr.length; i++) {
  24. const item = arr[i].split("=");
  25. result[item[0]] = item[1];
  26. }
  27. return result[query];
  28. };
  29.  
  30. if (urlBlock == null) {
  31. window.location.href = decodeURIComponent(
  32. getQuery(window.location.href, "url")
  33. );
  34. }
  35. window.location.href = urlBlock.textContent;
  36. })();