多领国阻止血量减少

阻止 多领国 网站在学习过程中因错误减少用户的血量,通过拦截并阻止相关的“remove-heart”请求。

目前为 2025-01-26 提交的版本。查看 最新版本

// ==UserScript==
// @name:en         DuoLingo Prevent Remove Heart
// @name            多领国阻止血量减少
// @namespace       https://space.bilibili.com/1569275826
// @match           *://*.duolingo.cn/*
// @match           *://*.duolingo.com/*
// @version         0.0.3
// @description     阻止 多领国 网站在学习过程中因错误减少用户的血量,通过拦截并阻止相关的“remove-heart”请求。
// @description:en  Prevent the Duolingo website from reducing the number of hearts for users during the learning process by intercepting and blocking related "remove-heart" requests.
// @author          深海云霁
// @license         MIT
// @icon            data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant           none
// ==/UserScript==

(function () {
  "use strict";

  const originalFetch = window.fetch;

  window.fetch = function (...args) {
    if (args[0].includes("remove-heart")) {
      return Promise.resolve(new Response(null, { status: 200 }));
    }

    return originalFetch(...args);
  };
})();

QingJ © 2025

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