-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforum.funkysouls.com.js
58 lines (51 loc) · 1.45 KB
/
forum.funkysouls.com.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// ==UserScript==
// @include http://forum.funkysouls.com/*
// @name
// @author Bga
// @include http://forum.funkysouls.com/*
// @version 0.1
// @description
// ==/UserScript==
opera.addEventListener('BeforeExternalScript', function(js) {
js.preventDefault()
}, false)
opera.addEventListener('BeforeScript', function(js) {
js.preventDefault()
}, false)
!(function(global) {
var waitCommon = function(fn) {
if(global.Bga) {
fn()
}
else {
setTimeout(function() {
waitCommon(fn)
}, 0)
}
}
waitCommon(function() {
with(Bga) {
setProtoExpando()
document.documentElement.removeInlineEvents()
var log = 0 ? logRaw : logNull
//disableAllScripts()
log("funkysouls")
//# fix volume
onDOMReady(function() {
//# replace youtube iframes to links
if(1) {
var toYoutubeAnchor = function(vId) {
var vHref = "http://www.youtube.com/watch?v=" + vId
return de("".concat("<a href='", vHref, "'>", vHref, "</a>"))
}
document.getElementsByTagName("iframe").each(function(v) {
v.replace(toYoutubeAnchor(v.src.match(/\/embed\/([\w\-]+)/i)[1]))
})
document.getElementsByTagName("object").each(function(v) {
v.replace(toYoutubeAnchor(v.getElementsByTagName("embed")[0].src.match(/\/v\/([\w\-]+)/i)[1]))
})
}
})
}
})
})(this)