您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes the "Empty Trash Now" link when in the Trash
// ==UserScript== // @name Gmail - Remove "Empty Trash Now" link // @namespace gmail_remove_empy_trash_now_link // @description Removes the "Empty Trash Now" link when in the Trash // @version 0.1 // @author Tim Berneman // @copyright Tim Berneman (c) 2015 // @include /https?:\/\/mail.google.com\/mail\/u\/0\/#trash/ // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js // @run-at document-start // // License: http://creativecommons.org/licenses/by-nc-sa/3.0/ // // CHANGELOG: // v0.1 - initial release // // ==/UserScript== // THESE DO NOT WORK FOR THIS SCRIPT! // // window.addEventListener ("load", pageFullyLoaded); // document.addEventListener ("DOMContentLoaded", DOM_ContentReady); // $(document).ready(function() {} ); // // I suspect Gmail is loading this particular code through AJAX and thus the above statements do not work. // // To circumvent this, I wait 3 seconds then call the function to hide the div. (Kludgy, I know, but it works!) function yourFunction() { if ( jQuery("div.ya") == null ) { setTimeout(function() { yourFunction(); }, 1000); } else { jQuery('span:contains("Empty Trash now")').parent().hide(); } } setTimeout(function() { yourFunction(); }, 3000);