From 80d072f1ccefa7d3d49f0f45e89b90c132619b99 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 16 Apr 2024 15:55:42 -0500 Subject: [PATCH] Website: remove client-side query string removal (#18336) Changes: - Removed the client-side browser history adjustment that was used to clean up URLs with query strings on the /contact, /register, and /fleetctl-preview pages. --- website/assets/js/pages/contact.page.js | 3 --- website/assets/js/pages/entrance/signup.page.js | 6 +----- website/assets/js/pages/fleetctl-preview.page.js | 7 +------ 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/website/assets/js/pages/contact.page.js b/website/assets/js/pages/contact.page.js index 8dfa2409f1..0a10b362a8 100644 --- a/website/assets/js/pages/contact.page.js +++ b/website/assets/js/pages/contact.page.js @@ -82,9 +82,6 @@ parasails.registerPage('contact', { } } } - if(window.location.search){// auto-clear query string (TODO: Document why we're doing this further. I think this shouldn't exist in the frontend code, instead in the hook. Because analytics corruption.) - window.history.replaceState({}, document.title, '/contact' ); - } }, mounted: async function() { //… diff --git a/website/assets/js/pages/entrance/signup.page.js b/website/assets/js/pages/entrance/signup.page.js index dc9a3a7781..1543e4c6f4 100644 --- a/website/assets/js/pages/entrance/signup.page.js +++ b/website/assets/js/pages/entrance/signup.page.js @@ -30,11 +30,7 @@ parasails.registerPage('signup', { // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣ // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝ beforeMount: function() { - // Removing the query string for users redirected to this page by the /try-fleet/explore-data pages. - // FUTURE: remove this when that view-query-report is updated. - if(window.location.search){ - window.history.replaceState({}, document.title, '/register' ); - } + //… }, mounted: async function() { //… diff --git a/website/assets/js/pages/fleetctl-preview.page.js b/website/assets/js/pages/fleetctl-preview.page.js index 61b887c492..48dd281a4b 100644 --- a/website/assets/js/pages/fleetctl-preview.page.js +++ b/website/assets/js/pages/fleetctl-preview.page.js @@ -10,12 +10,7 @@ parasails.registerPage('fleetctl-preview', { // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣ // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝ beforeMount: function() { - - // If the user navigated to this page from the 'try it now' button, we'll strip the '?tryitnow' from the url. - if(window.location.search){ - // https://caniuse.com/mdn-api_history_replacestate - window.history.replaceState({}, document.title, '/fleetctl-preview' ); - } + //… }, mounted: async function() { //…