您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
for old tweetdeck
// ==UserScript== // @name TweetDeck 延命 // @namespace https://rinsuki.net // @match https://tweetdeck.twitter.com/* // @version 1.0.1 // @author - // @description for old tweetdeck // @run-at document-start // ==/UserScript== function hook() { const xp = XMLHttpRequest.prototype const config = Object.getOwnPropertyDescriptor(xp, "responseText") let selfDestructTimer const myConfig = { ...config, get() { const orig = config.get.bind(this)() if (this.responseURL.startsWith("https://api.twitter.com/1.1/help/settings.json")) { const obj = JSON.parse(orig) console.info("original settings", obj) obj.config.tweetdeck_graphql_login = {value: true} const newResponseText = JSON.stringify(obj) console.info("feature flag hooked", newResponseText) if (selfDestructTimer != null) clearTimeout(selfDestructTimer) selfDestructTimer = setTimeout(() => { if (Object.getOwnPropertyDescriptor(xp, "responseText").get === myConfig.get) { console.info("it seems getter is not overrided, so hook will self-destruct...") Object.defineProperty(xp, "responseText", config) } }, 1000) return newResponseText } console.info("unrelated request...") return orig } } Object.defineProperty(xp, "responseText", myConfig) } if ("wrappedJSObject" in window) { console.info("hook for firefox") window.wrappedJSObject.eval(`(${hook.toString().replace(" hook", "")})()`) } else { console.info("hook for chromium") hook() }