您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a trigger to the outside of the tweet to be able to quickly close them. Allowing for a far more comfortable experience.
// ==UserScript== // @name Click outside tweet to close it // @description Adds a trigger to the outside of the tweet to be able to quickly close them. Allowing for a far more comfortable experience. // @version 1.2 // @include https://twitter.com/* // @grant none // @namespace https://gf.qytechs.cn/users/577280 // ==/UserScript== function attemptBack(){ const btn = document.querySelector('[aria-label="Back"]'); const close = document.querySelector('[aria-label="Close"]'); //Don't close when in image view as it's already handled by Twitter. if(btn !== null && close === null && window.location.toString().includes('/status/')) btn.click() } let leftShit, rightShit; document.querySelector("#react-root").addEventListener("click", e => { leftShit = leftShit || document.querySelector(".r-1rnoaur"); rightShit = rightShit || document.querySelector(".r-2llsf"); //Jeez I fucking despise these cryptic names. Thank god for aria lables. const role = e.target.getAttribute("role") if(role === "banner" || role === "main" || e.target == rightShit || e.target == leftShit) attemptBack(); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址