Skip to content

Commit

Permalink
debug searchparams
Browse files Browse the repository at this point in the history
  • Loading branch information
tamw-wnet committed Sep 27, 2024
1 parent 23f4177 commit 4bcc719
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/jquery.pids.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,16 @@ jQuery(document).ready(function($) {
const currentURL = window.location.href;
const searchParams = new URLSearchParams(currentURL);
if (searchParams.has("mvhash")) {
if (searchParams.get("mvhash") == correct_mvhash) {
console.log("found it");
let current_mvhash = searchParams.get("mvhash");
if (current_mvhash == correct_mvhash) {
console.log("cachebusting not required");
return;
}
}
// reload the page with the correct querystring
let urlwithoutqs = currentURL.split('?')[0];
window.location.replace(urlwithoutqs + "?mvhash=" + correct_mvhash);
//window.location.replace(urlwithoutqs + "?mvhash=" + correct_mvhash);
}

if (window.location.href.indexOf(userinfolink) > -1) {
Expand Down

0 comments on commit 4bcc719

Please sign in to comment.