Fix issues with timer names

This commit is contained in:
Reimar 2025-08-09 12:36:25 +02:00
parent ff5f60f765
commit 82868a6b22
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ var link = location.protocol + "//" + location.host + "/link" + location.search;
var popupLink = location.protocol + "//" + location.host + "/popup" + location.search;
history.replaceState(null, "", link);
document.title = parseQueryParams().name + " - Popup Timer";
document.title = decodeURIComponent(parseQueryParams().name) + " - Popup Timer";
if (navigator.platform.match(/Mac/i)) {
document.getElementById("win").style.display = "none";
@ -10,7 +10,7 @@ if (navigator.platform.match(/Mac/i)) {
}
[].slice.call(document.getElementsByClassName("type")).forEach(function(elem) {
elem.innerText = parseQueryParams().name.toLowerCase();
elem.innerText = parseQueryParams().type.toLowerCase();
});
document.getElementById("open-popup").onclick = function() {

View File

@ -1,7 +1,7 @@
var params = parseQueryParams();
// Set window title
if (params.name) document.title = params.name + " - Popup Timer";
if (params.name) document.title = decodeURIComponent(params.name) + " - Popup Timer";
var hours, minutes, seconds;
var secondsElem = document.getElementById("seconds");