This commit is contained in:
Zixaphir 2014-01-28 01:51:24 -07:00
parent 7930db0c81
commit 5a5658bc60
5 changed files with 22 additions and 20 deletions

View File

@ -4507,9 +4507,6 @@
$.on(this.searchInput, 'input', this.onSearchInput);
$.on($('#index-search-clear', this.navLinks), 'click', this.clearSearch);
$.on($('#returnlink a', this.navLinks), 'click', Navigate.navigate);
$.on($('#cataloglink a', this.navLinks), 'click', function() {
return window.location = "//boards.4chan.org/" + g.BOARD + "/catalog";
});
if (g.VIEW === 'index') {
this.update();
}
@ -8768,9 +8765,9 @@
flagsInput: function() {
var flag, nodes;
nodes = QR.nodes;
if (nodes.flagSelector) {
$.rm(nodes.flagSelector);
delete nodes.flagSelector;
if (nodes.flag) {
$.rm(nodes.flag);
delete nodes.flag;
}
if (g.BOARD.ID === 'pol') {
flag = QR.flags();
@ -15668,7 +15665,8 @@
return;
}
$.ready(function() {
return $.on(window, 'popstate', Navigate.popstate);
$.on(window, 'popstate', Navigate.popstate);
return $.id('catalog').href = $.id('cataloglink').href = "//boards.4chan.org/" + g.BOARD + "/catalog";
});
this.title = function() {};
Thread.callbacks.push({
@ -15874,6 +15872,7 @@
updateTitle: function(_arg) {
var board, subtitle, title;
board = _arg.board, title = _arg.title;
$.id('catalog').href = $.id('cataloglink').href = "//boards.4chan.org/" + g.BOARD + "/catalog";
if (subtitle = $('.boardSubtitle')) {
$.rm(subtitle);
}

View File

@ -4549,9 +4549,6 @@
$.on(this.searchInput, 'input', this.onSearchInput);
$.on($('#index-search-clear', this.navLinks), 'click', this.clearSearch);
$.on($('#returnlink a', this.navLinks), 'click', Navigate.navigate);
$.on($('#cataloglink a', this.navLinks), 'click', function() {
return window.location = "//boards.4chan.org/" + g.BOARD + "/catalog";
});
if (g.VIEW === 'index') {
this.update();
}
@ -8791,9 +8788,9 @@
flagsInput: function() {
var flag, nodes;
nodes = QR.nodes;
if (nodes.flagSelector) {
$.rm(nodes.flagSelector);
delete nodes.flagSelector;
if (nodes.flag) {
$.rm(nodes.flag);
delete nodes.flag;
}
if (g.BOARD.ID === 'pol') {
flag = QR.flags();
@ -15673,7 +15670,8 @@
return;
}
$.ready(function() {
return $.on(window, 'popstate', Navigate.popstate);
$.on(window, 'popstate', Navigate.popstate);
return $.id('catalog').href = $.id('cataloglink').href = "//boards.4chan.org/" + g.BOARD + "/catalog";
});
this.title = function() {};
Thread.callbacks.push({
@ -15879,6 +15877,7 @@
updateTitle: function(_arg) {
var board, subtitle, title;
board = _arg.board, title = _arg.title;
$.id('catalog').href = $.id('cataloglink').href = "//boards.4chan.org/" + g.BOARD + "/catalog";
if (subtitle = $('.boardSubtitle')) {
$.rm(subtitle);
}

View File

@ -86,7 +86,6 @@ Index =
$.on @searchInput, 'input', @onSearchInput
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
$.on $('#returnlink a', @navLinks), 'click', Navigate.navigate
$.on $('#cataloglink a', @navLinks), 'click', -> window.location = "//boards.4chan.org/#{g.BOARD}/catalog"
@update() if g.VIEW is 'index'
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->

View File

@ -3,8 +3,12 @@ Navigate =
init: ->
return if g.VIEW is 'catalog' or g.BOARD.ID is 'f' or !Conf['JSON Navigation']
# blink/webkit throw a popstate on page load. Not what we want.
$.ready -> $.on window, 'popstate', Navigate.popstate
$.ready ->
# blink/webkit throw a popstate on page load. Not what we want.
$.on window, 'popstate', Navigate.popstate
# Prevent having to update the catalog links whenever we open threads.
$.id('catalog').href = $.id('cataloglink').href = "//boards.4chan.org/#{g.BOARD}/catalog"
@title = -> return
@ -161,6 +165,7 @@ Navigate =
Style.setTheme theme
updateTitle: ({board, title}) ->
$.id('catalog').href = $.id('cataloglink').href = "//boards.4chan.org/#{g.BOARD}/catalog"
$.rm subtitle if subtitle = $ '.boardSubtitle'
$('.boardTitle').textContent = d.title = "/#{board}/ - #{title}"

View File

@ -524,9 +524,9 @@ QR =
flagsInput: ->
{nodes} = QR
if nodes.flagSelector
$.rm nodes.flagSelector
delete nodes.flagSelector
if nodes.flag
$.rm nodes.flag
delete nodes.flag
if g.BOARD.ID is 'pol'
flag = QR.flags()