多领国阻止血量减少 / DuoLingo Prevent Remove Heart

阻止 多领国 网站在学习过程中因错误减少用户的血量,通过拦截并阻止相关的“remove-heart”请求。/ Prevent the Duolingo website from reducing the number of hearts for users during the learning process by intercepting and blocking related "remove-heart" requests.

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

// ==UserScript==
// @name         多领国阻止血量减少 / DuoLingo Prevent Remove Heart
// @namespace    https://space.bilibili.com/1569275826
// @match        *://*.duolingo.cn/*
// @match        *://*.duolingo.com/*
// @version      0.0.2
// @description  阻止 多领国 网站在学习过程中因错误减少用户的血量,通过拦截并阻止相关的“remove-heart”请求。/ 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或关注我们的公众号极客氢云获取最新地址