您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
If loading of gMail-proxied image fails, changes it's SRC to original
// ==UserScript== // @name Deproxy gMail images onError // @description If loading of gMail-proxied image fails, changes it's SRC to original // @namespace http://eldar.cz/myf/ // @include https://mail.google.com/* // @version 1.0.0 // @grant none // ==/UserScript== ;(function() { "use strict" ; deproxy_gmail_images(); ; function deproxy_gmail_images() { var rxg = /.*?googleusercontent.*?#/ , prevent_propname = 'already tried to deproxy this image, move along' ; document.body.addEventListener ( 'error' , handleResourceError , true ) ; function handleResourceError(e) { var el = e.target ; if( !el || !el.tagName || 'IMG' != el.tagName || el[prevent_propname] ) return ; el[prevent_propname] = true ; if( rxg.test(el.src) ) el.src = el.src.replace(rxg, '') } } })();