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