Dodano obsługę URL w celu odcięcia części z hash oraz dodano logowanie dla niepasujących wzorców URL.
This commit is contained in:
6
apilo.js
6
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() {
|
||||
|
||||
Reference in New Issue
Block a user