From e6b8478d09db8ccac7bc80e401e998473352f41e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 21 Aug 2018 02:13:58 +0200 Subject: Use `window.location.assign` instead of `location.assign` Previously the `choice.npr.org` page wasn't showing up in history. Using `window` appears to fix this and correctly add the choice page to browser history. --- npr-text-mode-redirect.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npr-text-mode-redirect.user.js b/npr-text-mode-redirect.user.js index 00cb646..3fc4706 100644 --- a/npr-text-mode-redirect.user.js +++ b/npr-text-mode-redirect.user.js @@ -34,4 +34,4 @@ var url_parts = redirect_url.split('/'); // Second-to-last URL part is the article ID var article_id = url_parts[url_parts.length - 2]; -location.assign('https://text.npr.org/s.php?sId=' + article_id); +window.location.assign('https://text.npr.org/s.php?sId=' + article_id); -- cgit v1.2.3