Using jQuery to determine if a user has copied and pasted a full URL into their browser?

Not sure if this is possible, with or without jQuery. I have a page where there are two dropdown menus; one is showing today’s car sales and the other is showing car sales from yesterday. Today’s Sales is always rendered on page load; when a radio button is checked the Comparison Sales is then rendered and an extra path is added onto the URL.

The issue I have is that when a user is sent the url with the extra path (i.e the comparison menu has been selected prior to the link being sent) the text etc of the Today’s Sales dropdown won’t populate when they open the link.

So for eg:

URL with no comparison:

URL with comparison dropdown open:

I want to create an if statement to say something like

if(link.pasted) {
 //do this

Again not sure if this is possible.

Source: html

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.