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() {