From 492de3eab3de2cc859eae75ebbafe8b286104267 2016-12-29 15:33:22 From: Brett Smith Date: 2016-12-29 15:33:22 Subject: [PATCH] js: Rewrite #renew links to the Supporter page. #renewal is the correct hash to use. --- diff --git a/www/conservancy/static/js/supporter-page.js b/www/conservancy/static/js/supporter-page.js index 78c964101ea364b1eba07eb8d7288c6461fd0d14..f01c9ae764e3394e49db034fbf7d7cdf8d6e5e9d 100644 --- a/www/conservancy/static/js/supporter-page.js +++ b/www/conservancy/static/js/supporter-page.js @@ -12,6 +12,11 @@ var supportTypeSelector = function(supportTypeHash) { var $window = $(window); $window.load(function() { + /* We've sometimes published links that say #renew instead of #renewal. + Rewrite that to work as intended. */ + if (window.location.hash === "#renew") { + window.location.hash = "#renewal"; + } var $selectorLink = supportTypeSelector(window.location.hash); if ($selectorLink.length > 0) { $window.scrollTop($selectorLink.offset().top);