Skip to content

Commit

Permalink
ggpht: use location.replace
Browse files Browse the repository at this point in the history
  • Loading branch information
avindra committed Mar 9, 2024
1 parent e508fcf commit 9cd5d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ggpht.com/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const S = /s\d+-([cp])/;
if (!location.href.includes("4096")) {
const dest = location.href.replace(S, "s4096-$1");
if (dest !== location.href) {
location.href = dest;
location.replace(dest);
}

const dest2 = location.href.replace(/w\d+-h\d+/, "w4096");
if (dest2 !== location.href) {
location.href = dest2;
location.replace(dest2);
}
}

0 comments on commit 9cd5d1b

Please sign in to comment.