fix(whatsapp.lib): Sending of images in official.

This commit is contained in:
Rodrigo Rodriguez 2024-05-29 12:42:31 -03:00
parent abee86f162
commit a763c25f8f

View file

@ -917,7 +917,11 @@ export class KBService implements IGBKBService {
({ currentDomain, websiteIgnoreUrls }) => { ({ currentDomain, websiteIgnoreUrls }) => {
const anchors = Array.from(document.querySelectorAll('a')).filter(p => { const anchors = Array.from(document.querySelectorAll('a')).filter(p => {
try { try {
return currentDomain == new URL(p.href).hostname.toLocaleLowerCase(); // Check if urlToCheck contains any of the ignored URLs
const isIgnored = websiteIgnoreUrls.split(';').some(ignoredUrl => p.href.includes(ignoredUrl));
return !isIgnored && currentDomain == new URL(p.href).hostname;
} catch (err) { } catch (err) {
return false; return false;
} }