-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathflashversionfixer.user.js
More file actions
29 lines (26 loc) · 894 Bytes
/
flashversionfixer.user.js
File metadata and controls
29 lines (26 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name Flash version fixer
// @namespace com.cielavenir
// @description Fix flash version to 9.0 (some buggy websites checks the right before '.')
// @include *://*/*
// @run-at document-start
// @version 0.0.0.2
// ==/UserScript==
var run=function(){
var plugin=navigator.plugins['Shockwave Flash'];
if(!plugin)return;
var flash={};
flash.description='Shockwave Flash';
flash.suffixes='swf';
flash.type='application/x-shockwave-flash';
flash.enabledPlugin={};
flash.enabledPlugin.description='Shockwave Flash 9.0';
flash.enabledPlugin.__proto__=plugin;
navigator.mimeTypes["application/x-shockwave-flash"]=flash;
navigator.plugins['Shockwave Flash']=flash.enabledPlugin;
};
(function(){
var script = document.createElement('script');
script.textContent = '('+run.toString()+')();';
document.documentElement.appendChild(script);
})();