您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
changes the appearance of the video stream image to its normal state
当前为
// ==UserScript== // @name LELU Twitch aware Video Inverter // @version 1.0.0 // @description changes the appearance of the video stream image to its normal state // @author LeLuAware // @license MIT // @match https://www.twitch.tv/* // @match *://*.twitch.tv/* // @match *://twitch.tv/* // @grant none // @icon // @namespace https://gf.qytechs.cn/users/594536 // ==/UserScript== function toggleInvert() { const video = document.querySelector("video"); if (video) { const style = video.style; style.transform = style.transform ? '' : 'rotate(180deg)'; style.filter = style.filter ? '' : 'invert(1)'; } } // A function for adding an inversion button to the player Twitch function addInvertButtonToTwitch() { const video = document.querySelector('video'); if (!video) return; // find a container for the control buttons (Twitch uses .player-controls to control the player) const controls = document.querySelector('.player-controls'); if (!controls) return; // Если контейнер не найден, выходим // Check if there is already such a button if (document.querySelector('.invert-button')) return; // Creating an inversion button const button = document.createElement('button'); button.className = 'invert-button'; button.innerText = '🌌'; // The inversion symbol button.title = 'invert the video screen'; // Adding a click handler button.addEventListener('click', toggleInvert); // Adding a button to the Twitch control panel controls.appendChild(button); } // We start adding the button after loading the content window.addEventListener('DOMContentLoaded', () => { addInvertButtonToTwitch(); }); // For dynamic video pages (for example, Twitch) const observer = new MutationObserver(() => { addInvertButtonToTwitch(); }); observer.observe(document.body, { childList: true, subtree: true });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址