(() => {
const DEFAULT_PAGE = 'https://5-quantum.com/user/my/profile';
const funnelPage = 'pl/logic/funnel';
const tmpNoneAccessLinkStyle = () => {
return (``);
};
const CLOSED_PAGES = [
'https://5-quantum.com/pl/cms/page',
'https://5-quantum.com/pl/lite/widget',
'https://5-quantum.com/pl/metrika/traffic/report',
'https://5-quantum.com/pl/user/contact/index',
'https://5-quantum.com/user/control/survey/index',
'https://5-quantum.com/user/control/user/statistic',
'https://5-quantum.com/pl/user/settings',
'https://5-quantum.com/user/control/user/statistic',
'https://5-quantum.com/pl/tasks/task/kanban',
'https://5-quantum.com/pl/tasks/task/my',
'https://5-quantum.com/pl/tasks/mission/index',
'https://5-quantum.com/pl/tasks/task/stat',
'https://5-quantum.com/pl/notifications/control/mailings/active',
'https://5-quantum.com/pl/notifications/control/account-settings',
'https://5-quantum.com/pl/notifications/control/mailings/templates-list',
'https://5-quantum.com/pl/vk/control/themes',
'https://5-quantum.com/pl/whatsapp/control/bots',
'https://5-quantum.com/pl/viber/control/bots',
'https://5-quantum.com/pl/sales/deal',
'https://5-quantum.com/pl/sales/product/index',
'https://5-quantum.com/sales/control/participant',
'https://5-quantum.com/pl/sales/dealstat/index',
'https://5-quantum.com/pl/sales/promo',
'https://5-quantum.com/pl/sales/stream/stream-stat',
'https://5-quantum.com/saas/account/paymentsSettings',
'https://5-quantum.com/pl/chatium/school/enter',
'https://5-quantum.com/pl/chatium/school/gc',
'https://5-quantum.com/pl/chatium/course/index',
'https://5-quantum.com/chtm/s/ide/?purl=%2Fchtm%2F',
'https://5-quantum.com/pl/chatium/school/enter?path=https://5-quantum.com/c/s/index'
];
const NONE_ACCESS_ID = [
282043108,
257217139,
257139872,
236434761,
257141475,
253927974,
257138688,
257217345,
257217590,
260420474,
261100177,
261100367,
262778280,
273758771,
235676515,
257139375,
257217810,
265267464,
290849828,
294701864,
293634500,
262911308,
246127729,
181540778,
246127729,
265484062,
299776333,
265484430,
311576552,
315412513,
321916168,
321916891,
270258850,
257217590,
273758442,
348738195,
348738046,
348738137,
300267021,
294701864,
290221904,
282043108,
276657297,
273758771,
273758442,
270258977,
270258850,
265267274,
265265438,
262911308,
262778280,
261100367,
261100177,
260420474,
257217810,
257217688,
257217345,
257217139,
257217019,
257141475,
257139872,
257139375,
257138688,
253927974,
237020810,
236434761,
235676515,
378641100,
376781628,
385705565,
385709349,
385926627,
404876271
];
const tmpNoneAccessLinkStyleMarketologs = () => {
return (``);
};
const CLOSED_PAGES_MARKETOLOGS = [
'https://5-quantum.com/pl/cms/page',
'https://5-quantum.com/pl/lite/widget',
'https://5-quantum.com/pl/metrika/traffic/report',
'https://5-quantum.com/pl/user/contact/index',
'https://5-quantum.com/user/control/survey/index',
'https://5-quantum.com/user/control/user/statistic',
'https://5-quantum.com/pl/user/settings',
'https://5-quantum.com/user/control/user/statistic',
'https://5-quantum.com/pl/tasks/task/kanban',
'https://5-quantum.com/pl/tasks/task/my',
'https://5-quantum.com/pl/tasks/mission/index',
'https://5-quantum.com/pl/tasks/task/stat',
'https://5-quantum.com/pl/vk/control/themes',
'https://5-quantum.com/pl/whatsapp/control/bots',
'https://5-quantum.com/pl/viber/control/bots',
'https://5-quantum.com/pl/sales/deal',
'https://5-quantum.com/pl/sales/product/index',
'https://5-quantum.com/sales/control/participant',
'https://5-quantum.com/pl/sales/dealstat/index',
'https://5-quantum.com/pl/sales/promo',
'https://5-quantum.com/pl/sales/stream/stream-stat',
'https://5-quantum.com/saas/account/paymentsSettings',
'https://5-quantum.com/pl/chatium/school/enter',
'https://5-quantum.com/pl/chatium/school/gc',
'https://5-quantum.com/pl/chatium/course/index',
'https://5-quantum.com/chtm/s/ide/?purl=%2Fchtm%2F',
'https://5-quantum.com/pl/chatium/school/enter?path=https://5-quantum.com/c/s/index'
];
const NONE_ACCESS_ID_MARKETOLOGS = [
320893705,
326881571
]
const tmpNoneAccessLinkStyleDeals = () => {
return (``);
};
const CLOSED_PAGES_DEALS = [
'https://5-quantum.com/pl/cms/page',
'https://5-quantum.com/pl/lite/widget',
'https://5-quantum.com/pl/metrika/traffic/report',
'https://5-quantum.com/pl/user/contact/index',
'https://5-quantum.com/user/control/survey/index',
'https://5-quantum.com/user/control/user/statistic',
'https://5-quantum.com/pl/user/settings',
'https://5-quantum.com/user/control/user/statistic',
'https://5-quantum.com/pl/tasks/task/kanban',
'https://5-quantum.com/pl/tasks/task/my',
'https://5-quantum.com/pl/tasks/mission/index',
'https://5-quantum.com/pl/tasks/task/stat',
'https://5-quantum.com/pl/vk/control/themes',
'https://5-quantum.com/pl/whatsapp/control/bots',
'https://5-quantum.com/pl/viber/control/bots',
'https://5-quantum.com/saas/account/paymentsSettings',
'https://5-quantum.com/pl/chatium/school/enter',
'https://5-quantum.com/pl/chatium/school/gc',
'https://5-quantum.com/pl/chatium/course/index',
'https://5-quantum.com/chtm/s/ide/?purl=%2Fchtm%2F',
'https://5-quantum.com/pl/chatium/school/enter?path=https://5-quantum.com/c/s/index'
];
const NONE_ACCESS_ID_DEALS = [
265265438
]
const accountUserId = window.accountUserId;
if (NONE_ACCESS_ID.indexOf(accountUserId) !== -1) {
document.body.insertAdjacentHTML('beforeend', tmpNoneAccessLinkStyle());
for (const page of CLOSED_PAGES) {
if (location.href === page) {
location.href = DEFAULT_PAGE;
}
}
const check = setInterval(() => {
if (document.querySelector('.has-archived-row')) {
if (location.href.indexOf(funnelPage) !== -1) {
const hasArchivedRow = document.querySelectorAll('.has-archived-row');
for (const row of hasArchivedRow) {
row.style.display = 'none';
}
const tags = document.querySelectorAll('.gc-tags.gc-tags-editable span');
for (const tag of tags) {
if (tag.textContent === String(accountUserId)) {
tag.parentNode.parentNode.parentNode.style.display = 'table-row';
}
}
}
clearInterval(check);
}
}, 100);
}
if (NONE_ACCESS_ID_MARKETOLOGS.indexOf(accountUserId) !== -1) {
document.body.insertAdjacentHTML('beforeend', tmpNoneAccessLinkStyleMarketologs());
for (const page of CLOSED_PAGES_MARKETOLOGS) {
if (location.href === page) {
location.href = DEFAULT_PAGE;
}
}
const check = setInterval(() => {
if (document.querySelector('.has-archived-row')) {
if (location.href.indexOf(funnelPage) !== -1) {
const hasArchivedRow = document.querySelectorAll('.has-archived-row');
for (const row of hasArchivedRow) {
row.style.display = 'none';
}
const tags = document.querySelectorAll('.gc-tags.gc-tags-editable span');
for (const tag of tags) {
if (tag.textContent === String(accountUserId)) {
tag.parentNode.parentNode.parentNode.style.display = 'table-row';
}
}
}
clearInterval(check);
}
}, 100);
}
if (NONE_ACCESS_ID_DEALS.indexOf(accountUserId) !== -1) {
document.body.insertAdjacentHTML('beforeend', tmpNoneAccessLinkStyleDeals());
for (const page of CLOSED_PAGES_DEALS) {
if (location.href === page) {
location.href = DEFAULT_PAGE;
}
}
const check = setInterval(() => {
if (document.querySelector('.has-archived-row')) {
if (location.href.indexOf(funnelPage) !== -1) {
const hasArchivedRow = document.querySelectorAll('.has-archived-row');
for (const row of hasArchivedRow) {
row.style.display = 'none';
}
const tags = document.querySelectorAll('.gc-tags.gc-tags-editable span');
for (const tag of tags) {
if (tag.textContent === String(accountUserId)) {
tag.parentNode.parentNode.parentNode.style.display = 'table-row';
}
}
}
clearInterval(check);
}
}, 100);
}
})();