aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-08-21 02:13:58 +0200
committerTeddy Wing2018-08-21 02:13:58 +0200
commite6b8478d09db8ccac7bc80e401e998473352f41e (patch)
tree167ee95eb1f363b826deaba2493dbe76c0183be2
parent36758fd1ff687ee062d0403930aad85c7477d9bf (diff)
downloadnpr-text-mode-redirect-master.tar.bz2
Use `window.location.assign` instead of `location.assign`HEADmaster
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.
-rw-r--r--npr-text-mode-redirect.user.js2
1 files changed, 1 insertions, 1 deletions
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);