FuckQQ

拦你妈呢死妈 QQ 管家

目前为 2022-07-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name FuckQQ
  3. // @namespace https://github.com/Cierra-Runis/FuckQQ
  4. // @version 0.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://github.com/Cierra-Runis/FuckQQ/blob/master/favicon.png?raw=truedomain=qq.com
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. 'use strict';
  17. var clearFlag = 0;
  18. var count = 3; // 设置3秒后⾃动消失
  19. var showModal = function () {
  20. $("#my-modal-alert").toggle(); // 显⽰模态框
  21. $("#my-modal-alert").draggable({ // 设置模态框可拖动(需要引⼊jquery-ui.min.js)
  22. handle: ".modal-header"
  23. });
  24. clearFlag = self.setInterval("autoClose()", 1000); // 每过⼀秒调⽤⼀次autoClose⽅法
  25. }
  26. var autoClose = function () {
  27. if (count > 0) {
  28. $("#num").html(count + "秒后窗⼝将⾃动关闭");
  29. count--;
  30. } else if (count <= 0) {
  31. window.clearInterval(clearFlag);
  32. $("#num").html("");
  33. $("#my-modal-alert").fadeOut("slow");
  34. count = 3;
  35. $("#my-modal-alert").toggle();
  36. }
  37. }
  38.  
  39. window.location.href = document.getElementById('url').textContent;
  40. showModal();
  41. })();