diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 0879a86a1..49ed91320 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -130,7 +130,7 @@ Keybinds = if Conf['JSON Index'] and g.VIEW is 'index' and g.BOARD.ID isnt 'f' Index.userPageNav 1 else - window.location = "/#{g.BOARD}/" + location.href = "/#{g.BOARD}/" when Conf['Open front page'] $.open "#{location.origin}/#{g.BOARD}/" when Conf['Next page'] @@ -140,7 +140,7 @@ Keybinds = $('.next button', Index.pagelist).click() else if form = $ '.next form' - window.location = form.action + location.href = form.action when Conf['Previous page'] return unless g.VIEW is 'index' and g.BOARD.ID isnt 'f' if Conf['JSON Index'] @@ -148,7 +148,7 @@ Keybinds = $('.prev button', Index.pagelist).click() else if form = $ '.prev form' - window.location = form.action + location.href = form.action when Conf['Search form'] return unless g.VIEW is 'index' and g.BOARD.ID isnt 'f' searchInput = if Conf['JSON Index'] then Index.searchInput else $.id('search-box') @@ -156,16 +156,16 @@ Keybinds = searchInput.focus() when Conf['Paged mode'] return unless Conf['JSON Index'] and g.BOARD.ID isnt 'f' - window.location = if g.VIEW is 'index' then '#paged' else "/#{g.BOARD}/#paged" + location.href = if g.VIEW is 'index' then '#paged' else "/#{g.BOARD}/#paged" when Conf['Infinite scrolling mode'] return unless Conf['JSON Index'] and g.BOARD.ID isnt 'f' - window.location = if g.VIEW is 'index' then '#infinite' else "/#{g.BOARD}/#infinite" + location.href = if g.VIEW is 'index' then '#infinite' else "/#{g.BOARD}/#infinite" when Conf['All pages mode'] return unless Conf['JSON Index'] and g.BOARD.ID isnt 'f' - window.location = if g.VIEW is 'index' then '#all-pages' else "/#{g.BOARD}/#all-pages" + location.href = if g.VIEW is 'index' then '#all-pages' else "/#{g.BOARD}/#all-pages" when Conf['Open catalog'] return if g.BOARD.ID is 'f' - window.location = CatalogLinks.catalog() + location.href = CatalogLinks.catalog() when Conf['Cycle sort type'] return unless Conf['JSON Index'] and g.VIEW is 'index' and g.BOARD.ID isnt 'f' Index.cycleSortType() diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 901619a77..abd9a6689 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -852,7 +852,7 @@ QR = open = if Conf['Open Post in New Tab'] or postsCount -> $.open URL else - -> window.location = URL + -> location.href = URL if threadID is postID # XXX 4chan sometimes responds before the thread exists. diff --git a/src/Quotelinks/QuoteYou.coffee b/src/Quotelinks/QuoteYou.coffee index 5a5aa0a76..6749a68e1 100644 --- a/src/Quotelinks/QuoteYou.coffee +++ b/src/Quotelinks/QuoteYou.coffee @@ -115,7 +115,7 @@ QuoteYou = return false else QuoteYou.lastRead = root - window.location = "##{post.id}" + location.href = "##{post.id}" Header.scrollTo post $.addClass post, 'highlight' return true