kutt.appinn.net Demon Mirror

小众软件短链还原

  1. // ==UserScript==
  2. // @name kutt.appinn.net Demon Mirror
  3. // @namespace jerryshell
  4. // @version 0.4
  5. // @description 小众软件短链还原
  6. // @author github.com/jerryshell
  7. // @match *://www.appinn.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=appinn.com
  9. // @grant GM_xmlhttpRequest
  10. // @connect kutt.appinn.net
  11. // @license GNU Affero General Public License v3.0
  12. // ==/UserScript==
  13.  
  14. /* jshint esversion: 6 */
  15.  
  16. (() => {
  17. 'use strict';
  18. [...document.querySelectorAll('a[href^="https://kutt.appinn.net/"]')]
  19. .forEach(kuttAElement => GM_xmlhttpRequest({
  20. method: 'HEAD',
  21. url: kuttAElement.href,
  22. onload: (response) => {
  23. if (response.status === 200) {
  24. const realUrl = response.finalUrl;
  25. if (realUrl) {
  26. kuttAElement.textContent = realUrl;
  27. kuttAElement.href = realUrl;
  28. }
  29. } else {
  30. console.error(response);
  31. }
  32. },
  33. onerror: (error) => {
  34. const realUrl = error.error.split('"')[1];
  35. if (realUrl) {
  36. kuttAElement.textContent = realUrl;
  37. kuttAElement.href = realUrl;
  38. }
  39. },
  40. }));
  41. })();

QingJ © 2025

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