您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Move the Telegram chat bubble to the left and hide the "All Chats" button
当前为
// ==UserScript== // @name Change Telegram web page elements // @namespace https://greasyfork.org/zh-CN/users/737511 // @description Move the Telegram chat bubble to the left and hide the "All Chats" button // @version 0.3 // @icon https://files.codelife.cc/user-website-icon/20230808/ErvslN5_TO_7idq_Lw1kQ3143.svg // @author Kaede // @match https://web.telegram.org/k/* // @grant GM_addStyle // @license MIT // @run-at document-end // ==/UserScript== (function() { 'use strict'; function moveChatElementsOnce() { GM_addStyle('.chat-input, .bubbles-date-group { transform: translateX(-95px); }'); // Wait for the "All Chats" button to appear, then hide it const hideAllChatsButton = () => { const allChatsButton = document.querySelector('.active.rp.menu-horizontal-div-item'); if (allChatsButton && allChatsButton.textContent.trim() === "All Chats") { allChatsButton.style.display = "none"; // Auto switch to the second element in .menu-horizontal-div const secondMenuItem = document.querySelector('div.rp.menu-horizontal-div-item:nth-of-type(2)'); if (secondMenuItem) { secondMenuItem.click(); } } else { requestAnimationFrame(hideAllChatsButton); } }; // Start the process to hide "All Chats" hideAllChatsButton(); } // Execute the function immediately when the script is loaded moveChatElementsOnce(); })();