Slight reflow

I doubt we'll ever have a video in a 404'd tab. srsly.
This commit is contained in:
Zixaphir 2014-05-16 09:17:23 -07:00
parent 39b0587ddf
commit d08ccf7ddb
3 changed files with 27 additions and 29 deletions

View File

@ -13824,18 +13824,6 @@
case 'i.4cdn.org':
$.ready(function() {
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')) {
Redirect.init();
pathname = location.pathname.split('/');
@ -13846,6 +13834,17 @@
if (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;

View File

@ -13842,18 +13842,6 @@
case 'i.4cdn.org':
$.ready(function() {
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')) {
Redirect.init();
pathname = location.pathname.split('/');
@ -13864,6 +13852,17 @@
if (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;

View File

@ -54,11 +54,6 @@ Main =
return
when 'i.4cdn.org'
$.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']
Redirect.init()
pathname = location.pathname.split '/'
@ -66,6 +61,11 @@ Main =
boardID: g.BOARD.ID
filename: pathname[pathname.length - 1]
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
# c.time 'All initializations'