您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enhance fast reading by highlighting specific syllables in Hindi script and letters in English script for Hindi and English web pages respectively. Works on all websites. Press Alt + R to toggle FastReader.
当前为
// ==UserScript== // @name FastReader for Hindi and English // @version 1.8 // @description Enhance fast reading by highlighting specific syllables in Hindi script and letters in English script for Hindi and English web pages respectively. Works on all websites. Press Alt + R to toggle FastReader. // @license MIT // @match *://*/* // @grant none // @author iamnobody // @namespace http://tampermonkey.net/ // ==/UserScript== (function() { 'use strict'; // Check if the current element is part of the main website if (window.self === window.top) { // Create and style the toggle button var toggleButton = document.createElement('button'); toggleButton.id = 'fast-reader-toggle-button'; toggleButton.style.position = 'fixed'; toggleButton.style.bottom = '20px'; toggleButton.style.left = '20px'; toggleButton.style.width = '50px'; toggleButton.style.height = '50px'; toggleButton.style.borderRadius = '50%'; toggleButton.style.backgroundColor = 'red'; toggleButton.style.color = 'white'; toggleButton.style.fontSize = '24px'; toggleButton.style.border = 'none'; toggleButton.innerText = 'R'; toggleButton.setAttribute('aria-label', 'Toggle Fast Reading (Alt + R)'); document.body.appendChild(toggleButton); // Set default state of fast reading feature var isFastReadingOn = false; // Add event listener to toggle button toggleButton.addEventListener('click', toggleFastReading); // Add event listener for Alt + R keyboard shortcut document.addEventListener('keydown', function(event) { if (event.altKey && event.key === 'r') { toggleFastReading(); } }); // Function to toggle fast reading feature function toggleFastReading() { // Toggle fast reading feature and button color isFastReadingOn = !isFastReadingOn; toggleButton.style.backgroundColor = isFastReadingOn ? 'green' : 'red'; // Activate/deactivate fast reading feature based on button state if (isFastReadingOn) { activateFastReading(); } else { deactivateFastReading(); } } // Add other functions (activateFastReading, deactivateFastReading, highlightWord, isHindiWord, isSpecialHindiCharacter) here... } // Add the rest of your existing code here... })();