-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysku.ru.js
62 lines (52 loc) · 1.56 KB
/
mysku.ru.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
58
59
60
61
62
// ==UserScript==
// @name mysku redirect free
// @include https://mysku.ru/*
// @description
// ==/UserScript==
opera.addEventListener('BeforeExternalScript', function(js) {
// opera.postError(js.element)
js.preventDefault()
}, false)
opera.addEventListener('BeforeScript', function(js) {
// opera.postError(js.element)
js.preventDefault()
}, false)
!(function(global) {
var waitCommon = function(fn) {
if(global.Bga) {
fn()
}
else {
setTimeout(function() {
waitCommon(fn)
}, 0)
}
}
waitCommon(function() {
with(Bga) {
onDOMReady(function() {
setProtoExpando()
document.documentElement.removeInlineEvents()
var log = 1 ? logRaw : logNull
//# All shop links are referral free
document.getElementsByTagName("A").each(function(a) {
var hrefMatch = a.href.match(/^http(s?)\:\/\/go(\.mysku\.ru|\.promostack\.ru)\/\?(.*)$/)
if(hrefMatch != null) {
if(0) log(hrefMatch[2])
a.href = parseQueryString(hrefMatch[3])["r"]
}
else {
}
})
//# All images are clickable
document.getElementsByTagName("IMG").each(function(img) {
if(100 <= img.offsetWidth && 100 <= img.offsetHeight) {
img.wrap(de("".concat('<a href="', img.src, '" ><content /></a>')))
}
else {
}
})
})
}
})
})(this)