AI Prompts ▸ Squarespace Prompts
Squarespace Prompts
Here are the GPT prompts I used for the Squarespace site at https://nifty.business to ensure that the rating widget always has the correct page URL by removing parameters from the URL if the page was visited from a search results page. The site originally used jQuery but with these prompts I could also remove the need for the jQuery library, speeding the site up in the process.
Write code in JavaScript with jQuery to strip the parameters from the current URL and redirect to the new URL.
Change this code to only work on the domain "nifty.business".
Change this code to only run if there are any URL parameters. (so there is no redirect when no URL parameters were present.
Change this code to only redirect the page when the url parameter "rq" is present.
Replace this jQuery JavaScript statement with pure JavaScript: $(document).ready(function() {}
AI Prompts ▸ Squarespace Prompts