From 3943502bf7e8cedc664ce7b1904a8d0dc2d11c03 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Mon, 14 Jul 2025 00:45:46 +0200 Subject: [PATCH] =?UTF-8?q?Dodano=20obs=C5=82ug=C4=99=20URL=20w=20celu=20o?= =?UTF-8?q?dci=C4=99cia=20cz=C4=99=C5=9Bci=20z=20hash=20oraz=20dodano=20lo?= =?UTF-8?q?gowanie=20dla=20niepasuj=C4=85cych=20wzorc=C3=B3w=20URL.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apilo.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apilo.js b/apilo.js index bb97d24..e8eefe3 100644 --- a/apilo.js +++ b/apilo.js @@ -1,4 +1,4 @@ -const currentUrl = window.location.href; +const currentUrl = window.location.href.split('#')[0]; // odcinamy część z hash const patterns = [ /^https:\/\/projectpro\.apilo\.com\/order\/order\/news\/?$/, /^https:\/\/projectpro\.apilo\.com\/order\/order\/in-progress\/?$/, @@ -6,9 +6,11 @@ const patterns = [ /^https:\/\/projectpro\.apilo\.com\/order\/order\/completed\/?$/, /^https:\/\/projectpro\.apilo\.com\/order\/order\/all\/?$/ ]; -if (patterns.some(pattern => pattern.test(currentUrl))) { +if (patterns.some(pattern => pattern.test(currentUrl))) { console.log('test'); waitForTableAndSetImage(); attachTableReloadListener(); +} else { + console.log('Nie pasuje do żadnego wzorca URL'); } function waitForTableAndSetImage() {