From 82868a6b228d931a3fde629fa0eb08130aa1fa9a Mon Sep 17 00:00:00 2001 From: Reimar Date: Sat, 9 Aug 2025 12:36:25 +0200 Subject: [PATCH] Fix issues with timer names --- bookmark/script.js | 4 ++-- popup/script.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookmark/script.js b/bookmark/script.js index 6f562ef..4cf9ae7 100644 --- a/bookmark/script.js +++ b/bookmark/script.js @@ -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() { diff --git a/popup/script.js b/popup/script.js index 5e19d7e..1662292 100644 --- a/popup/script.js +++ b/popup/script.js @@ -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");