@tet-vivi с веб ртк я проверил, всё нормально.
How to Disable Image?
-
I'm new to BAS. I want to block all resource consuming factors such as images etc.
It is explained in the forum that it can be done with request mask deny in the Network, but there is no request mask deny setting in the latest version I use.
I thought of it myself and blocked images and the like by writing a code in the Execute On Every Page Load in Browser section. However, the images are loaded at the first opening of the pages and then blocked. How do I ensure that images and videos never load or open?
The Code I wrote:
var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { if (node.nodeType === 1) { cleanNode(node); } }); }); }); function cleanNode(root) { const selectors = [ 'img', 'video', 'audio', 'source', 'iframe', 'embed', 'object', 'canvas', 'svg', 'picture', 'style', 'link[rel="stylesheet"]', 'script', '[class*="ad"]', '[id*="ad"]', '[class*="banner"]', '[id*="banner"]', '[class*="sponsor"]', '[id*="sponsor"]' ]; selectors.forEach(selector => { const elements = root.querySelectorAll(selector); elements.forEach(el => el.remove()); }); } // Sayfa ilk yüklendiğinde temizle document.addEventListener('DOMContentLoaded', function() { cleanNode(document); observer.observe(document.body, { childList: true, subtree: true }); }); -
test_jpg.xml
test script in 28.7.0 -
@clarabellerising said in How to Disable Image?:
test_jpg.xml
test script in 28.7.0First of all, thank you for your help. Even though I did as in the example you gave, the images are still displayed in Google search. What am I missing?

-
@radb0310 said in How to Disable Image?:
@rcd Google render image on server and response in HTML, can not deny request

@clarabellerising said in How to Disable Image?:
@radb0310 check initiator and you'll see who make's this image
Thank you for your response. Can you explain in more detail? I still don't know what to do.

