Last active
April 3, 2026 18:38
-
-
Save fi-res/bbb51629457bb5784863629785cdb39a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name ITD - Скрыть кнопки подписки | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2.0 | |
| // @description Скрывает кнопки покупки подписки и показывает статус активной подписки на итд.com | |
| // @author firedotguy | |
| // @match *://итд.com/* | |
| // @match *://xn--d1ah4a.com/* | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== | |
| (function () { | |
| 'use strict'; | |
| const _fetch = window.fetch; | |
| window.fetch = async function (...args) { | |
| const response = await _fetch(...args); | |
| const url = typeof args[0] === 'string' ? args[0] : args[0]?.url; | |
| if (url && url.includes('/api/users/me')) { | |
| const json = await response.json(); | |
| if (json.subscription) { | |
| json.subscription.isActive = true; | |
| } | |
| return new Response(JSON.stringify(json), { | |
| status: response.status, | |
| statusText: response.statusText, | |
| headers: response.headers, | |
| }); | |
| } | |
| return response; | |
| }; | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment