Handle current page links a bit more elegantly

This commit is contained in:
Zixaphir 2014-03-08 16:44:54 -07:00
parent a380e85d8d
commit e6534a5d21
3 changed files with 16 additions and 0 deletions

View File

@ -12763,6 +12763,11 @@
return;
}
if (this.pathname === Navigate.path) {
if (g.VIEW === 'thread') {
ThreadUpdater.update();
} else {
Index.update();
}
e.preventDefault();
return;
}

View File

@ -12777,6 +12777,11 @@
return;
}
if (this.pathname === Navigate.path) {
if (g.VIEW === 'thread') {
ThreadUpdater.update();
} else {
Index.update();
}
e.preventDefault();
return;
}

View File

@ -160,7 +160,13 @@ Navigate =
navigate: (e) ->
return if @hostname isnt 'boards.4chan.org' or window.location.hostname is 'rs.4chan.org'
return if e and (e.shiftKey or e.ctrlKey or (e.type is 'click' and e.button isnt 0)) # Not simply a left click
if @pathname is Navigate.path
if g.VIEW is 'thread'
ThreadUpdater.update()
else
Index.update()
e.preventDefault()
return