阻止FLASH自动加载

阻止FLASH自动播放(也可以用快捷键 ALT + U 进行加白播放)已经对常用网站进行加白。

// ==UserScript==
// @name 阻止FLASH自动加载
// @description 阻止FLASH自动播放(也可以用快捷键 ALT + U 进行加白播放)已经对常用网站进行加白。
// @author jxb
// @version 1.0
// @match *://*/*
// @exclude /^https?:\/\/.+?\/thread-/
// @exclude /^https?:\/\/[^\/]+?\/share\/[^\/]+$/
// @exclude /^https?:\/\/[^\/]+?\.(?:(?:admflt|ku8box)\.|xiami\.com\/player\/)/
// @exclude /^https?:\/\/.{1,}(?:=play.+?_id=|\/(?:video|play(?:er)?|Music)\/|\.m(?:3u8|p4)\?\w+?=)/
// @exclude /^https?:\/\/.{1,}\.(?:txt|swf|gif|png|ico|jpg|mp4|hlv|wav|wma|m4a|webm|ogg|ogv|acc|mov|mkv|m3u8|ts|xml|jpeg|bmp|php\?\w+=)/
// @exclude /^https?:\/\/(?:.+?(?:\w+?_\w+?|search|jx|url|id|v|&[^\/]+?|\w+?\.html\?\w+?)[#=\?]https?:\/\/)?[^\/]+?\.(?:youku|mgtv|sohu|pptv|wasu|1905|iqiyi|le|qq|bilibili|fun|miguvideo|yinyuetai)\./
// @exclude /^https?:\/\/(?:app\.beva\.|player\.kuwo\.cn\/webmusic\/|www\.vvvdj\.com\/play\/|www\.zybus\.com\/[^\/]+\/\d+\.|player\.|bbs\.voc\.com\.cn\/topic-|cn\.zyshow\.co\/\w+\/v\/|www\.360doc\.com\/content\/)/
// @grant none
// @run-at document-body
// @namespace https://greasyfork.org/users/694396
// ==/UserScript==

(function() {
	'use strict';
	let exclude = [];
	let css = 'object:not([type]),object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid$=":d27cdb6e-ae6d-11cf-96b8-444553540000"],object[classid$="D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid$="d27cdb6e-ae6d-11cf-96b8-444553540000"],object[codebase$="swflash.cab"],embed[type$="application/x-shockwave-flash"],embed[src*=".swf"],object[type$="application/x-shockwave-flash"],object[src*=".swf"],object[codetype$="application/x-shockwave-flash"],object[classid$=":22d6f312-b0f6-11d0-94ab-0080c74c7e95"],object[classid$=":02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"],object[classid$=":CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"]{display: none !important;}';
	let flash = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwAAADsABataJCQAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAKcElEQVRYR62XCXRU5RXHv+/NJCQQSAgkhC2QZMIOHlFRS+kp1gVoPUAPKCiL2qMILkVqkdpSFFwQBLdKUaxa8RwUq60UjwuBhASykJVsJGSSkGSWbGRP5r2ZN9/t/44zFLV6tO13zv+8mW+59/fud7/73hM/oGlQODQEioUSoHFQYvDK/7mfx8Mgnv9/aRKyQIOheCjZahWpM6ZI22PrxLQP94vZxw+JOYdfFrM3rRFTJycJm8UiUnkeFAdFQrye7fxXje8kAoqXUthumBdjq81NXWjWj95LdVE5dF5z0jnRQxWij0pFNxWLJioUp8w88dy5D8SN10wTKVhrgxhmEPSDI8P0Q6GkSamxKRdrV95OLYtOkWuOrhyp5K2NV72lQ0xPrjQGsqTXkyWMvhyr6SuUShUIolwxQNniRPNRsWTcqADMBIi3ie1+r8YTY6SUtr/sf2CG6n7mferc6DVbV6nuihu8LUeneJyvxeuu3ZFe93bN594mTcjn3iG9rj0Wve0dbaA3TfP6c6Wi00JXmeKtXRvEVNhkmGFB+9/ZeEK0pmm2s8V5PyZvebnqf48GGrZ5XUdu050vXuVzPT5eudcNJfdtVnIvktR8syD3AmipJPdq6EGpXFulr/k1i6f/hOYDCFGmyM98VczBtoZAvnVrOHmGIAIp+Weyricy7crsps6KT3TnW494HdtuVs41NnLPHUqtiRa6OExQxyAoTNBFXNuHCmodK6j5akEuALkeAMxT0uj82Gpga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dMYPjgXcPseT/zlkpLThQJH28Q13aWiAx3uZjnqxKPu11ibkeFvGPrpvBrxo4NlWJeOTvnD2Ge/52ffT9ksBHePVxiuU3nBGNHfAwPgkvwYBvP7/H7l+BciP8C1Tb+o9iUkX0AAAAASUVORK5CYII=';
	let prefix = 'ujs_flashblock';
	let addStyle = function(css) {
			let s = document.createElement('style');
			s.setAttribute('type', 'text/css');
			s.setAttribute('style', 'display: none !important;');
			s.appendChild(document.createTextNode(css));
			return (document.getElementsByTagName('head')[0] || document.documentElement).appendChild(s);
		};
	let getValue = function(name) {
			if (window.localStorage) {
				return window.localStorage[name] || '';
			} else {
				let nameEQ = name + '=';
				let ca = document.cookie.split(';');
				for (let i = 0, c; c = ca[i]; i++) {
					while (c.charAt(0) == ' ')
					c = c.substring(1, c.length);
					if (c.indexOf(nameEQ) === 0) return unescape(c.substring(nameEQ.length, c.length));
				}
				return '';
			}
		};
	let setValue = function(name, value, days) {
			if (window.localStorage) {
				window.localStorage[name] = value;
			} else {
				let date = new Date();
				date.setTime(date.getTime() + ((days || 10 * 365) * 24 * 60 * 60 * 1000));
				if (document.cookie.split(';').length < 30 && document.cookie.length - escape(getValue(name)).length + escape(value).length < 4000) {
					document.cookie = name + '=' + escape(value) + '; expires=' + date.toGMTString() + '; path=/';
				} else {
					alert('Cookies is full!');
				}
			}
		};
	let getVideo = function(flashvars, src) {
			let getLink = function(s) {
					let rez = s.match(/[^\s\x22=&?]+\.[^\s\x22=&?\/]*(flv|f4v|mp4)/i);
					return rez ? rez[0] : '';
				};
			let getQuery = function(s, q) {
					let rez = s.match(new RegExp('[&?]' + q + '=([^&]+)'));
					return rez ? rez[1] : '';
				};
			let getURL = function(f, s) {
					return f.match(/^(\w+:\/\/|\/|$)/) ? f : s.replace(/[#?].*$/, '').replace(/[^\/]*$/, f);
				};
			let flv = decodeURIComponent(flashvars);
			let q = '',
				url = location.href;
			return getURL(getLink(flv) || decodeURIComponent(getLink(src)), src);
		};
	let getParam = function(e, n) {
			let v = '',
				r = new RegExp('^(' + n + ')$', 'i');
			let param = e.getElementsByTagName('param');
			for (let i = 0, p; p = param[i]; i++) {
				if (p.hasAttribute('name') && p.getAttribute('name').match(r)) {
					v = p.getAttribute('value');
					break;
				}
			}
			return v;
		};
	let qualifyURL = function(url) {
			if (!url) return '';
			let a = document.createElement('a');
			a.href = url;
			return a.href;
		};
	let isBlocked = function(ele) {
			return getComputedStyle(ele, null).display == 'none';
		};
	let delStyle = function(css) {
			let styles = document.getElementsByTagName('style');
			for (let i = 0, s; s = styles[i]; i++) {
				if (s.innerHTML == css) {
					s.parentNode.removeChild(s);
					break;
				}
			}
		};
	let delPlaceholders = function() {
			let divs = document.getElementsByClassName(prefix + '_placeholder');
			for (let j = divs.length - 1; j >= 0; j--)
			divs[j].parentNode.removeChild(divs[j]);
		};
	let createMenu = function(pos, items) {
			let container = document.getElementById(prefix + '_menu');
			if (container) container.parentNode.removeChild(container);
			container = document.createElement('div');
			container.setAttribute('style', 'display:block !important;overflow:hidden !important;position:fixed !important;top:' + pos.y + 'px !important;left:' + pos.x + 'px !important;margin:0 !important;padding:2px !important;background-color:transparent !important;color:black !important;border:1px solid #FF8D00 !important;box-shadow: 0 0 30px 0 #FF8D00 !important;z-index:1000 !important;');
			container.id = prefix + '_menu';
			let menu = document.createElement('ul');
			menu.setAttribute('style', 'margin:0 !important;padding:0 !important;list-style:none !important;');
			container.appendChild(menu);
			for (let i = 0, item; item = items[i]; i++) {
				let list = document.createElement('li');
				list.setAttribute('style', 'font-family:tahoma,sans-serif !important;font-size:11px !important;line-height:normal !important;white-space:nowrap !important;list-style-position:outside !important;cursor:default !important;' + (item[0] === '' ? 'margin:3px !important;padding:0 !important;border-top:1px solid #FF8D00 !important' : 'margin:0 !important;padding:3px 9px !important;'));
				list.appendChild(document.createTextNode(item[0]));
				if (item[1]) {
					list.onclick = item[1];
				}
				menu.appendChild(list);
			}
			document.addEventListener('click', function(e) {
				this.removeEventListener(e.type, arguments.callee, false);
				container.parentNode.removeChild(container);
			}, false);
			return document.documentElement.appendChild(container);
		};
	let createImage = function(ele) {
			let embed = ele.getElementsByTagName('embed')[0];
			let src = ele.getAttribute('src') || ele.getAttribute('source') || ele.getAttribute('data') || getParam(ele, 'movie|data|src|code|filename|url|source') || (embed && embed.getAttribute('src'));
			let d = document.createElement('div');
			d.setAttribute('style', 'display:inline-block !important;visibility:visible !important;overflow:hidden !important;box-shadow: 0 0 35px 0 #FF8D00 !important;z-index:999 !important;border:3px solid #FF8D00 !important;min-width:33px !important;min-height:33px !important;height:' + getComputedStyle(ele, null).height + ';width:' + getComputedStyle(ele, null).width + ';background:url(' + flash + ')no-repeat center !important;cursor:pointer !important;-webkit-box-sizing:border-box !important;');
			d.setAttribute('title', qualifyURL(src));
			d.onmouseover = function() {
				d.style.backgroundImage = 'url(' + play + ')';
			};
			d.onmouseout = function() {
				d.style.backgroundImage = 'url(' + flash + ')';
			};
			d.className = prefix + '_placeholder';
			d.onclick = function(ev) {
				ev.preventDefault();
				ev.stopPropagation();
				if (!ev.shiftKey && (ev.ctrlKey || ev.metaKey) && !ev.altKey && src) {
					location.href = getVideo(ele.getAttribute('flashvars') || getParam(ele, 'flashvars'), src) || src;
				} else {
					d.parentNode.removeChild(d);
					ele.style.setProperty('display', 'inline-block', 'important');
					if (embed && isBlocked(embed)) embed.style.setProperty('display', 'inline-block', 'important');
				}
			};
			ele.parentNode.insertBefore(d, ele);
		};
	let createPlaceholders = function() {
			let i, e, obj;
			obj = document.getElementsByTagName('object');
			for (i = 0; e = obj[i]; i++) {
				if (isBlocked(e)) createImage(e);
			}
			obj = document.getElementsByTagName('embed');
			for (i = 0; e = obj[i]; i++) {
				if (isBlocked(e) && !isBlocked(e.parentNode)) createImage(e);
			}
			obj = document.getElementsByTagName('iframe');
			for (i = 0; e = obj[i]; i++) {
				if (e.getAttribute('type') == 'application/x-shockwave-flash' && isBlocked(e)) createImage(e);
			}
		};
	let host = location.hostname.replace(/^www\./, '');
	for (let i = 0; i < exclude.length; i++) {
		if (host == exclude[i]) return;
	}
	let val = getValue(prefix);
	if (val != 'unblocked') {
		setTimeout(function() {
			addStyle(css);
		}, 1);
		if (val != 'justblocked') window.addEventListener('load', function() {
			setTimeout(createPlaceholders, 300);
		}, false);
	}
	document.addEventListener('keydown', function(e) {
		if (e.keyCode == 85 && ((e.shiftKey && e.ctrlKey) != e.altKey)) {
			if (getValue(prefix) != 'unblocked') {
				delStyle(css);
				delPlaceholders();
				setValue(prefix, 'unblocked');
			} else {
				addStyle(css);
				createPlaceholders();
				setValue(prefix, 'blocked', -1);
			}
		}
	}, false);
})();