-
Notifications
You must be signed in to change notification settings - Fork 0
/
imgur.com.js
74 lines (61 loc) · 1.73 KB
/
imgur.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// ==UserScript==
// @name mysku redirect free
// @include https://imgur.com/*
// @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, undefined) {
var urlMatch = location.pathname.match(/^\/(\w+)$/)
if(urlMatch != null) {
location.replace("".concat("https://imgur.com/", urlMatch[1], ".png"))
}
else {
}
})(this)
;(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 = 1 ? logRaw : logNull
opera.postError("imgur.com")
onDOMReady(function() {
//# show gallery' images
var urlMatch = location.pathname.match(/^\/a|gallery\/(\w+)$/)
if(urlMatch == null) {
}
else {
document.getElementsByClassName("post-images")[0].children.each(function(node) {
if(node.tagName.toUpperCase() == "DIV" && node.id != "") {
var div = node
if(div.id != null) {
div.replace(de("".concat("<img src='https://i.imgur.com/", div.id, ".png'/>")))
}
else {
}
}
else {
}
})
}
})
}
})
})(this)