JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div id="thisIsDefinitelyNotUsedSomewhereElse" style="display: none;">true</div>
<div class="theRest">
this is the rest of the site
</div>
</body>
JavaScript
function myPrint() {
window.print();
}
function urlFinder() {
thisUrl = window.location.href;
thisPathname = window.location.pathname;
'AdditionalItems'
is part of pathname ");*/
var isComplete = thisPathname.indexOf("
CompleteRental ");
var isRedirect = document.getElementById('thisIsDefinitelyNotUsedSomewhereElse');
alert(isComplete + " this isComplete ");
alert(isRedirect + " this isRedirect ");
alert(document.getElementById('thisIsDefinitelyNotUsedSomewhereElse') + " this is the full get element ");
}
window.onload=urlFinder();