您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes Refresh button in GMail always visible in split screen mode
// ==UserScript== // @name GMail Refresh Icon Always Visible // @namespace http://tampermonkey.net/ // @version 0.1 // @description Makes Refresh button in GMail always visible in split screen mode // @author denisab85 // @match https://mail.google.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com // @grant none // ==/UserScript== const BTN_SELECTOR = "[title='Refresh'],[data-tooltip='Refresh']"; const buttonAddedObserver = new MutationObserver(onMutation); var btnRefresh; (function() { 'use strict'; starter(); })(); function starter() { // in case the content script was injected after the page is partially loaded onMutation([{addedNodes: [document.documentElement]}]); observe(); } function onMutation(mutations) { let stopped; for (const {addedNodes} of mutations) { for (const node of addedNodes) { if (node.tagName) { if (node.matches(BTN_SELECTOR) || node.firstElementChild && node.querySelector(BTN_SELECTOR)) { stopped = true; buttonAddedObserver.disconnect(); btnRefresh = document.querySelector(BTN_SELECTOR).parentElement; console.log('Refresh button added. Adding btnRefreshObserver'); let btnRefreshObserver = new MutationObserver(btnRefreshCallback); btnRefreshObserver.observe(btnRefresh, { attributes: true }); } } } } if (stopped) observe(); } function observe() { buttonAddedObserver.observe(document, { subtree: true, childList: true, }); } function btnRefreshCallback(mutations) { for (let mutation of mutations) { if (mutation.type === 'attributes' && btnRefresh.style.display !== '') { console.log('Mutation Detected'); btnRefresh.style=''; } } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址