LEX1 Цитата: Где именно не работает?
здесь (пример)
http://www.youtube.com/watch?gl=RU&hl=ru&v=GP22WwciX0U Опера 12.11.1658 (на ХР)
FlashBlock.js v1.3.15
[more]
Код: [no]// ==UserScript==
// @name Flash Block
// @author Lex1
// @version 1.3.15
// @description Blocks Flash and shows images instead. For Opera 9.5+. Press Ctrl+Shift+F or Ctrl+Alt+F for permanent unblocking on the site.
// @ujs:documentation
http://ruzanow.ru/index/0-5 // @ujs:download
http://ruzanow.ru/userjs/FlashBlock.js // @exclude file://*
// @exclude
http://www.adata.com.tw/* // @exclude
http://projects.scanex.ru/mchs/* // @exclude
http://memori.ru/* // @exclude
http://vkontakte.ru/* // @exclude
http://mail.google.com/* // @exclude
http://translate.google.* // @exclude
http://files.mail.ru/* // @exclude
http://*megaupload.com/* // @exclude
http://*blizzard.com/* // @exclude
http://gs.statcounter.com/* // @exclude
http://*.operaunite.com/media_player/* // @exclude
http://example.com/* // @exclude
http://lj-toys.com/* // @exclude
http://opera-ac.net/* // @exclude
http://*.opera.com/* // @exclude
http://*.drweb.com/* // @exclude
http://*.asus.com/* // @exclude
http://turbobit.net/* // @exclude
http://java.com/* // @exclude
http://www.adrive.com/* // ==/UserScript==
(function(){
var flash = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAImElEQVRYw6VYa4wV5Rl+5nbOnt2FpbJqlatCkYvp2q7FNhRqtbfYSGqxP1wjSug1tgoxpLbWpqnRpImJUKzilWgNqakQxUtRrD9AvKy2hSorrooLbLAUdtldzpyZ7/veS3/MnNk9BYvaSSbnm8mZeZ/v+Z73ed9vPFXFRzne2ru/BcBCAPNVtYNFZjHLZGJuc8TDjqjfOtdrLO0y1nYb67ZfcclX44/ybu9kIN58p2+673tLPM9bDGCRKqCqYGEwC1gEjgiOGMY6GGuRGIsktdtSazenxmy87srL+j4xiJ173lse+P4y3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Mrw4CqE4WfUZF8l1DBFDdCs/bbIwZ3PHspgP/118DpVy1YKBDmOaJyBxV6YdipqpMU9UuVR0FcBjAPqgOwfN2GmO27Xh20zn9P/FfMLAKQByL5f0AAAAASUVORK5CYII=';
var prefix = 'ujs_flashblock', cName = prefix+'_disabled';
var css = 'object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"]:not(.'+cName+'),object[classid$=":d27cdb6e-ae6d-11cf-96b8-444553540000"]:not(.'+cName+'),object[codebase*="swflash.cab"]:not(.'+cName+'),object[data*=".swf"]:not(.'+cName+'),object[type="application/x-shockwave-flash"]:not(.'+cName+'),object[src*=".swf"]:not(.'+cName+'),object[codetype="application/x-shockwave-flash"]:not(.'+cName+'),embed[type="application/x-shockwave-flash"]:not(.'+cName+'),embed[src*=".swf"]:not(.'+cName+'),embed[allowscriptaccess]:not(.'+cName+'),embed[flashvars]:not(.'+cName+'),embed[wmode]:not(.'+cName+'),embed:not([type]):not(.'+cName+'),'
// + 'object[classid$=":166B1BCA-3F9C-11CF-8075-444553540000"]:not(.'+cName+'),object[codebase*="sw.cab"]:not(.'+cName+'),object[data*=".dcr"]:not(.'+cName+'),object[type="application/x-director"]:not(.'+cName+'),object[src*=".dcr"]:not(.'+cName+'),embed[type="application/x-director"]:not(.'+cName+'),embed[src*=".dcr"]:not(.'+cName+'),'
// + 'object[classid$=":15B782AF-55D8-11D1-B477-006097098764"]:not(.'+cName+'),object[codebase*="awswaxf.cab"]:not(.'+cName+'),object[data*=".aam"]:not(.'+cName+'),object[type="application/x-authorware-map"]:not(.'+cName+'),object[src*=".aam"]:not(.'+cName+'),embed[type="application/x-authorware-map"]:not(.'+cName+'),embed[src*=".aam"]:not(.'+cName+'),'
+ 'object[classid$="32C73088-76AE-40F7-AC40-81F62CB2C1DA"]:not(.'+cName+'),object[type="application/ag-plugin"]:not(.'+cName+'),object[type="application/x-silverlight"]:not(.'+cName+'),object[type="application/x-silverlight-2"]:not(.'+cName+'),object[source*=".xaml"]:not(.'+cName+'),object[sourceelement*="xaml"]:not(.'+cName+'),embed[type="application/ag-plugin"]:not(.'+cName+'),embed[source*=".xaml"]:not(.'+cName+'),'
+ 'applet:not(.'+cName+'),object[classid*=":8AD9C840-044E-11D1-B3E9-00805F499D93"]:not(.'+cName+'),object[classid^="clsid:CAFEEFAC-"]:not(.'+cName+'),object[classid^="java:"]:not(.'+cName+'),object[type="application/x-java-applet"]:not(.'+cName+'),embed[classid*=":8AD9C840-044E-11D1-B3E9-00805F499D93"]:not(.'+cName+'),embed[classid^="clsid:CAFEEFAC-"]:not(.'+cName+'),embed[classid^="java:"]:not(.'+cName+'),embed[type="application/x-java-applet"]:not(.'+cName+')'
+ '{content: "" !important; display: inline-block !important; outline: 1px dotted #bbbbbb !important; min-width: 33px !important; min-height: 33px !important; cursor: pointer !important; background: url("'+flash+'") no-repeat center !important;}'
+ 'object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"]:not(.'+cName+'):hover,object[classid$=":d27cdb6e-ae6d-11cf-96b8-444553540000"]:not(.'+cName+'):hover,object[codebase*="swflash.cab"]:not(.'+cName+'):hover,object[data*=".swf"]:not(.'+cName+'):hover,object[type="application/x-shockwave-flash"]:not(.'+cName+'):hover,object[src*=".swf"]:not(.'+cName+'):hover,object[codetype="application/x-shockwave-flash"]:not(.'+cName+'):hover,embed[type="application/x-shockwave-flash"]:not(.'+cName+'):hover,embed[src*=".swf"]:not(.'+cName+'):hover,embed[allowscriptaccess]:not(.'+cName+'):hover,embed[flashvars]:not(.'+cName+'):hover,embed[wmode]:not(.'+cName+'):hover,embed:not([type]):not(.'+cName+'):hover,'
// + 'object[classid$=":166B1BCA-3F9C-11CF-8075-444553540000"]:not(.'+cName+'):hover,object[codebase*="sw.cab"]:not(.'+cName+'):hover,object[data*=".dcr"]:not(.'+cName+'):hover,object[type="application/x-director"]:not(.'+cName+'):hover,object[src*=".dcr"]:not(.'+cName+'):hover,embed[type="application/x-director"]:not(.'+cName+'):hover,embed[src*=".dcr"]:not(.'+cName+'):hover,'
// + 'object[classid$=":15B782AF-55D8-11D1-B477-006097098764"]:not(.'+cName+'):hover,object[codebase*="awswaxf.cab"]:not(.'+cName+'):hover,object[data*=".aam"]:not(.'+cName+'):hover,object[type="application/x-authorware-map"]:not(.'+cName+'):hover,object[src*=".aam"]:not(.'+cName+'):hover,embed[type="application/x-authorware-map"]:not(.'+cName+'):hover,embed[src*=".aam"]:not(.'+cName+'):hover,'
+ 'object[classid$="32C73088-76AE-40F7-AC40-81F62CB2C1DA"]:not(.'+cName+'):hover,object[type="application/ag-plugin"]:not(.'+cName+'):hover,object[type="application/x-silverlight"]:not(.'+cName+'):hover,object[type="application/x-silverlight-2"]:not(.'+cName+'):hover,object[source*=".xaml"]:not(.'+cName+'):hover,object[sourceelement*="xaml"]:not(.'+cName+'):hover,embed[type="application/ag-plugin"]:not(.'+cName+'):hover,embed[source*=".xaml"]:not(.'+cName+'):hover,'
+ 'applet:not(.'+cName+'):hover,object[classid*=":8AD9C840-044E-11D1-B3E9-00805F499D93"]:not(.'+cName+'):hover,object[classid^="clsid:CAFEEFAC-"]:not(.'+cName+'):hover,object[classid^="java:"]:not(.'+cName+'):hover,object[type="application/x-java-applet"]:not(.'+cName+'):hover,embed[classid*=":8AD9C840-044E-11D1-B3E9-00805F499D93"]:not(.'+cName+'):hover,embed[classid^="clsid:CAFEEFAC-"]:not(.'+cName+'):hover,embed[classid^="java:"]:not(.'+cName+'):hover,embed[type="application/x-java-applet"]:not(.'+cName+'):hover'
+ '{background-image: url("'+play+'") !important;}';
var addStyle = function(css){
var 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);
};
var getValue = function(name){
if(window.localStorage){
return window.localStorage.getItem(name) || '';
}
else{
var eq = name+'=', ca = document.cookie.split(';');
for(var i = ca.length; i--;){
var c = ca[i];
while(c.charAt(0) == ' ')c = c.slice(1);
if(c.indexOf(eq) == 0)return unescape(c.slice(eq.length));
};
return '';
}
};
var setValue = function(name, value, del){
if(window.localStorage){
if(del){window.localStorage.removeItem(name)}else{window.localStorage.setItem(name, value)};
}
else{
if(document.cookie.split(';').length < 30 && document.cookie.length-escape(getValue(name)).length+escape(value).length < 4000){
var date = new Date();
date.setTime(date.getTime()+((del ? -1 : 10*365)*24*60*60*1000));
document.cookie = name+'='+escape(value)+'; expires='+date.toGMTString()+'; path=/';
}
else{
alert('Cookies is full!');
}
}
};
var getVideo = function(flashvars, src){
var getLink = function(s){var rez = s.match(/[^\s\x22=&?]+\.[^\s\x22=&?\/]*(flv|mp4)/i); return rez ? rez[0] : ''};
var getQuery = function(s, q){var rez = s.match(new RegExp('[&?]'+q+'=([^&]+)')); return rez ? rez[1] : ''};
var getJson = function(s, q){var rez = s.match(new RegExp('\x22'+q+'\x22:\\s*(\x22.+?\x22)')); return rez ? eval(rez[1]) : ''};
var getURL = function(f, s){return f.match(/^(\w+:\/\/|\/|$)/) ? f : s.replace(/[#?].*$/, '').replace(/[^\/]*$/, f)};
var decodeURL = function(s){try{return decodeURIComponent(s)}catch(e){return unescape(s)}};
var q = '', url = location.href, flv = decodeURL(flashvars);
if( url.indexOf('youtube.com/watch?') != -1 && (q = getQuery(flv, 'video_id')) )return 'http://www.youtube.com/get_video?video_id='+q+'&t='+getQuery(flv, 't')+'&fmt=18';
if( url.indexOf('video.google.com/videoplay?') != -1 && (q = getQuery(src, 'videoUrl')) )return decodeURL(q);
if( url.indexOf('metacafe.com/watch/') != -1 && (q = getQuery(flv, 'mediaURL')) )return q+'?__gda__='+getQuery(flv, 'gdaKey');
if( url.indexOf('dailymotion.com/') != -1 && (q = getJson(flv,'hqURL') || getJson(flv,'sdURL')) )return q;
if( url.indexOf('my-hit.ru/film/') != -1 && (q = getLink(flv)) )return q+'?start=0&id='+getQuery(flv, 'id');
return getURL(getLink(flv) || decodeURL(getLink(src)), src);
};
var getParam = function(e, n){
var v = '', r = new RegExp('^('+n+')$', 'i');
var param = e.getElementsByTagName('param');
for(var i = 0, p; p = param[i]; i++){
if(p.hasAttribute('name') && p.getAttribute('name').match(r)){v = p.getAttribute('value'); break};
};
return v;
};
var qualifyURL=function(url){
if(!url)return '';
var a = document.createElement('a');
a.href = url;
return a.href;
};
var addClassName = function(ele, cName){
ele.className += (ele.className ? ' ' : '')+cName;
};
var delClassName = function(ele, cName){
var a = ele.className.split(' ');
for(var i = a.length; i--;){
if(a[i] == cName)a.splice(i, 1);
};
ele.className = a.join(' ');
};
var isBlocked = function(ele){
var tag = ele && ele.nodeName.toLowerCase();
return (tag == 'embed' || tag == 'object' || tag == 'applet') && (ele.currentStyle.content || getComputedStyle(ele, null).content) == '""';
};
var setStatus = function(value){
if(top == self){
window.status = value;
window.defaultStatus = value;
window.setTimeout(function(){window.defaultStatus = ''}, 4000);
}
};
var delStyle = function(css){
var styles = document.getElementsByTagName('style');
for(var i = styles.length; i--;){
if(styles[i].innerHTML == css)styles[i].parentNode.removeChild(styles[i]);
}
};
var getLng = function(){
switch(window.navigator.language){
case 'ru': return {
fEnabled: 'FlashBlock \u0432\u043A\u043B\u044E\u0447\u0435\u043D',
fDisabled: 'FlashBlock \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D'
};
default: return {
fEnabled: 'FlashBlock enabled',
fDisabled: 'FlashBlock disabled'
}
}
};
var unblockFlash = function(e){
var ele = e && e.target; if(!ele)return;
var embed = ele.getElementsByTagName('embed')[0];
if(isBlocked(ele) && !e.shiftKey && !e.altKey){
e.preventDefault();
e.stopPropagation();
var src = ele.getAttribute('src') || ele.getAttribute('source') || ele.getAttribute('data') || getParam(ele, 'movie|data|src|code|filename|url|source') || (embed && embed.getAttribute('src')) || '';
if(e.ctrlKey){
// Save video with Ctrl+Click
if(src)location.href = getVideo(ele.getAttribute('flashvars') || getParam(ele, 'flashvars'), src) || src;
}
else{
// Unblock flash
addClassName(ele, cName);
if(isBlocked(embed))addClassName(embed, cName);
if(ele.getAttribute('title') == qualifyURL(src))ele.removeAttribute('title');
}
}
};
var showAddress = function(e){
var ele = e && e.target; if(!ele)return;
if(!ele.title && isBlocked(ele)){
var src = ele.getAttribute('src') || ele.getAttribute('source') || ele.getAttribute('data') || getParam(ele, 'movie|data|src|code|filename|url|source');
if(src)ele.setAttribute('title', qualifyURL(src));
}
};
var toggle = function(block){
var postMsg = function(msg){for(var i = 0, f = window.frames, l = f.length; i < l; i++)f[i].postMessage(msg, '*')};
var lng = getLng();
if(arguments.length ? !block : getValue(prefix) != 'unblocked'){
delStyle(css);
setValue(prefix, 'unblocked');
postMsg(prefix+'_disable');
document.removeEventListener('click', unblockFlash, true);
document.removeEventListener('mouseover', showAddress, false);
setStatus(lng.fDisabled);
}
else{
addStyle(css);
setValue(prefix, '', true);
postMsg(prefix+'_enable');
document.addEventListener('click', unblockFlash, true);
document.addEventListener('mouseover', showAddress, false);
setStatus(lng.fEnabled);
};
var unblockedEle = document.getElementsByClassName(cName);
for(var i = unblockedEle.length; i--;){
delClassName(unblockedEle[i], cName);
}
};
var loadImages = function(){
var embed = document.getElementsByTagName('embed');
var obj = document.getElementsByTagName('object');
var isShowImagesMode = function(){
var imgs = document.images;
var l = imgs && imgs.length;
return l && imgs[0].complete && imgs[l-1].complete;
};
if((embed.length == 0 && obj.length == 0) || isShowImagesMode())return;
var reloadImage = function(s){
var f = document.createElement('iframe');
f.src = s;
f.width = 0;
f.height = 0;
f.frameBorder = 'no';
f.scrolling = 'no';
f.onload = function(){
this.parentNode.removeChild(this);
};
document.documentElement.appendChild(f);
};
reloadImage(flash);
reloadImage(play);
};
// Non html
if(!(document.documentElement instanceof HTMLHtmlElement))return;
// Blocking
if(getValue(prefix) != 'unblocked'){
addStyle(css);
// unblock flash
document.addEventListener('click', unblockFlash, true);
// show title
document.addEventListener('mouseover', showAddress, false);
// load flashblock images in "cached images" mode
window.addEventListener('load', loadImages, false);
};
// Unblock for the site with Ctrl+Shift+F or Ctrl+Alt+F
document.addEventListener('keypress', function(e){
if(e.keyCode == 70 && e.ctrlKey && (e.shiftKey != e.altKey))toggle();
}, false);
// For buttons
window.addEventListener('message', function(e){
if(e.data == prefix+'_disable')toggle(false);
if(e.data == prefix+'_enable')toggle(true);
}, false);
})();
[/no]