implement #773
This commit is contained in:
parent
7476c51f0f
commit
a5463ac53e
@ -4324,6 +4324,9 @@
|
|||||||
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1],
|
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1],
|
||||||
className: 'external'
|
className: 'external'
|
||||||
});
|
});
|
||||||
|
if (a.hostname === 'boards.4chan.org' && a.pathname.split('/')[1] === g.BOARD.ID) {
|
||||||
|
a.className += ' current';
|
||||||
|
}
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
board = /^current/.test(t) ? g.BOARD.ID : t.match(/^[^-]+/)[0];
|
board = /^current/.test(t) ? g.BOARD.ID : t.match(/^[^-]+/)[0];
|
||||||
@ -5005,7 +5008,7 @@
|
|||||||
if (!(hash = window.location.hash)) {
|
if (!(hash = window.location.hash)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!(match = hash.match(/s=([\w]+)/))) {
|
if (!(match = hash.match(/s=([\w\s\n]+)/))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.searchInput.value = match[1];
|
this.searchInput.value = match[1];
|
||||||
|
|||||||
@ -4378,6 +4378,9 @@
|
|||||||
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1],
|
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1],
|
||||||
className: 'external'
|
className: 'external'
|
||||||
});
|
});
|
||||||
|
if (a.hostname === 'boards.4chan.org' && a.pathname.split('/')[1] === g.BOARD.ID) {
|
||||||
|
a.className += ' current';
|
||||||
|
}
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
board = /^current/.test(t) ? g.BOARD.ID : t.match(/^[^-]+/)[0];
|
board = /^current/.test(t) ? g.BOARD.ID : t.match(/^[^-]+/)[0];
|
||||||
@ -5059,7 +5062,7 @@
|
|||||||
if (!(hash = window.location.hash)) {
|
if (!(hash = window.location.hash)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!(match = hash.match(/s=([\w]+)/))) {
|
if (!(match = hash.match(/s=([\w\s\n]+)/))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.searchInput.value = match[1];
|
this.searchInput.value = match[1];
|
||||||
|
|||||||
@ -162,6 +162,8 @@ Header =
|
|||||||
href: (t.match(/\,"(.+)"/) || [null, '+'])[1]
|
href: (t.match(/\,"(.+)"/) || [null, '+'])[1]
|
||||||
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1]
|
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1]
|
||||||
className: 'external'
|
className: 'external'
|
||||||
|
if a.hostname is 'boards.4chan.org' and a.pathname.split('/')[1] is g.BOARD.ID
|
||||||
|
a.className += ' current'
|
||||||
return a
|
return a
|
||||||
|
|
||||||
board = if /^current/.test t
|
board = if /^current/.test t
|
||||||
|
|||||||
@ -288,7 +288,7 @@ Index =
|
|||||||
|
|
||||||
searchTest: (init) ->
|
searchTest: (init) ->
|
||||||
return false unless hash = window.location.hash
|
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]
|
@searchInput.value = match[1]
|
||||||
if init
|
if init
|
||||||
$.on d, '4chanXInitFinished', Index.onSearchInput
|
$.on d, '4chanXInitFinished', Index.onSearchInput
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user