This commit is contained in:
Zixaphir 2014-07-27 13:38:27 -07:00
parent 7476c51f0f
commit a5463ac53e
5 changed files with 14 additions and 6 deletions

View File

@ -4324,6 +4324,9 @@
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1],
className: 'external'
});
if (a.hostname === 'boards.4chan.org' && a.pathname.split('/')[1] === g.BOARD.ID) {
a.className += ' current';
}
return a;
}
board = /^current/.test(t) ? g.BOARD.ID : t.match(/^[^-]+/)[0];
@ -5005,7 +5008,7 @@
if (!(hash = window.location.hash)) {
return false;
}
if (!(match = hash.match(/s=([\w]+)/))) {
if (!(match = hash.match(/s=([\w\s\n]+)/))) {
return false;
}
this.searchInput.value = match[1];

View File

@ -4378,6 +4378,9 @@
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1],
className: 'external'
});
if (a.hostname === 'boards.4chan.org' && a.pathname.split('/')[1] === g.BOARD.ID) {
a.className += ' current';
}
return a;
}
board = /^current/.test(t) ? g.BOARD.ID : t.match(/^[^-]+/)[0];
@ -5059,7 +5062,7 @@
if (!(hash = window.location.hash)) {
return false;
}
if (!(match = hash.match(/s=([\w]+)/))) {
if (!(match = hash.match(/s=([\w\s\n]+)/))) {
return false;
}
this.searchInput.value = match[1];

View File

@ -162,6 +162,8 @@ Header =
href: (t.match(/\,"(.+)"/) || [null, '+'])[1]
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1]
className: 'external'
if a.hostname is 'boards.4chan.org' and a.pathname.split('/')[1] is g.BOARD.ID
a.className += ' current'
return a
board = if /^current/.test t

View File

@ -288,7 +288,7 @@ Index =
searchTest: (init) ->
return false unless hash = window.location.hash
return false unless match = hash.match /s=([\w]+)/
return false unless match = hash.match /s=([\w\s\n]+)/
@searchInput.value = match[1]
if init
$.on d, '4chanXInitFinished', Index.onSearchInput

View File

@ -5,7 +5,7 @@ Navigate =
<% if (type === 'crx') { %>
# blink/webkit throw a popstate on page load. Not what we want.
popstateHack = ->
popstateHack = ->
$.off window, 'popstate', popstateHack
$.on window, 'popstate', Navigate.popstate
@ -189,7 +189,7 @@ Navigate =
$.set 'Index Sort', Conf['Index Sort'] = Index.selectSort.value = indexSort
Index.cb.sort()
result = true
return result
navigate: (e) ->
@ -237,7 +237,7 @@ Navigate =
if @id is 'popState'
Navigate.path = window.location
else
Navigate.pushState path
Navigate.pushState path
Navigate.setMode @