Fix image archive redirection on direct links.
This commit is contained in:
parent
d76c999101
commit
a62ba9413d
@ -3614,8 +3614,8 @@
|
||||
|
||||
Redirect = {
|
||||
init: function() {
|
||||
var url;
|
||||
url = location.hostname === 'images.4chan.org' ? this.image(location.href) : /^\d+$/.test(g.THREAD_ID) ? this.thread() : void 0;
|
||||
var path, url;
|
||||
url = location.hostname === 'images.4chan.org' ? (path = location.pathname.split('/'), this.image(path[1], path[3])) : /^\d+$/.test(g.THREAD_ID) ? this.thread() : void 0;
|
||||
if (url) {
|
||||
return location.href = url;
|
||||
}
|
||||
|
||||
@ -2763,7 +2763,8 @@ Redirect =
|
||||
init: ->
|
||||
url =
|
||||
if location.hostname is 'images.4chan.org'
|
||||
@image location.href
|
||||
path = location.pathname.split '/'
|
||||
@image path[1], path[3]
|
||||
else if /^\d+$/.test g.THREAD_ID
|
||||
@thread()
|
||||
location.href = url if url
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user