Slight reflow
I doubt we'll ever have a video in a 404'd tab. srsly.
This commit is contained in:
parent
39b0587ddf
commit
d08ccf7ddb
@ -13824,18 +13824,6 @@
|
|||||||
case 'i.4cdn.org':
|
case 'i.4cdn.org':
|
||||||
$.ready(function() {
|
$.ready(function() {
|
||||||
var URL, pathname, video, _ref;
|
var URL, pathname, video, _ref;
|
||||||
if (Conf['Loop in New Tab'] && (video = $('video'))) {
|
|
||||||
Video.configure(video);
|
|
||||||
if (!video.controls) {
|
|
||||||
$.on(video, 'click', function() {
|
|
||||||
if (video.paused) {
|
|
||||||
return video.play();
|
|
||||||
} else {
|
|
||||||
return video.pause();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Conf['404 Redirect'] && ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found')) {
|
if (Conf['404 Redirect'] && ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found')) {
|
||||||
Redirect.init();
|
Redirect.init();
|
||||||
pathname = location.pathname.split('/');
|
pathname = location.pathname.split('/');
|
||||||
@ -13846,6 +13834,17 @@
|
|||||||
if (URL) {
|
if (URL) {
|
||||||
return location.replace(URL);
|
return location.replace(URL);
|
||||||
}
|
}
|
||||||
|
} else if (Conf['Loop in New Tab'] && (video = $('video'))) {
|
||||||
|
Video.configure(video);
|
||||||
|
if (!video.controls) {
|
||||||
|
return $.on(video, 'click', function() {
|
||||||
|
if (video.paused) {
|
||||||
|
return video.play();
|
||||||
|
} else {
|
||||||
|
return video.pause();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -13842,18 +13842,6 @@
|
|||||||
case 'i.4cdn.org':
|
case 'i.4cdn.org':
|
||||||
$.ready(function() {
|
$.ready(function() {
|
||||||
var URL, pathname, video, _ref;
|
var URL, pathname, video, _ref;
|
||||||
if (Conf['Loop in New Tab'] && (video = $('video'))) {
|
|
||||||
Video.configure(video);
|
|
||||||
if (!video.controls) {
|
|
||||||
$.on(video, 'click', function() {
|
|
||||||
if (video.paused) {
|
|
||||||
return video.play();
|
|
||||||
} else {
|
|
||||||
return video.pause();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Conf['404 Redirect'] && ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found')) {
|
if (Conf['404 Redirect'] && ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found')) {
|
||||||
Redirect.init();
|
Redirect.init();
|
||||||
pathname = location.pathname.split('/');
|
pathname = location.pathname.split('/');
|
||||||
@ -13864,6 +13852,17 @@
|
|||||||
if (URL) {
|
if (URL) {
|
||||||
return location.replace(URL);
|
return location.replace(URL);
|
||||||
}
|
}
|
||||||
|
} else if (Conf['Loop in New Tab'] && (video = $('video'))) {
|
||||||
|
Video.configure(video);
|
||||||
|
if (!video.controls) {
|
||||||
|
return $.on(video, 'click', function() {
|
||||||
|
if (video.paused) {
|
||||||
|
return video.play();
|
||||||
|
} else {
|
||||||
|
return video.pause();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -54,11 +54,6 @@ Main =
|
|||||||
return
|
return
|
||||||
when 'i.4cdn.org'
|
when 'i.4cdn.org'
|
||||||
$.ready ->
|
$.ready ->
|
||||||
if Conf['Loop in New Tab'] and video = $ 'video'
|
|
||||||
Video.configure video
|
|
||||||
if !video.controls
|
|
||||||
$.on video, 'click', ->
|
|
||||||
if video.paused then video.play() else video.pause()
|
|
||||||
if Conf['404 Redirect'] and d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
if Conf['404 Redirect'] and d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
||||||
Redirect.init()
|
Redirect.init()
|
||||||
pathname = location.pathname.split '/'
|
pathname = location.pathname.split '/'
|
||||||
@ -66,6 +61,11 @@ Main =
|
|||||||
boardID: g.BOARD.ID
|
boardID: g.BOARD.ID
|
||||||
filename: pathname[pathname.length - 1]
|
filename: pathname[pathname.length - 1]
|
||||||
location.replace URL if URL
|
location.replace URL if URL
|
||||||
|
else if Conf['Loop in New Tab'] and video = $ 'video'
|
||||||
|
Video.configure video
|
||||||
|
if !video.controls
|
||||||
|
$.on video, 'click', ->
|
||||||
|
if video.paused then video.play() else video.pause()
|
||||||
return
|
return
|
||||||
|
|
||||||
# c.time 'All initializations'
|
# c.time 'All initializations'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user