remove target=_blank attributes with script

gobekli

New Member
Hi,

I wanted to remove all target=_blank attributes from links (<a href="..." target="_blank">), so I made a script rule:

#%#Array.from(document.querySelectorAll('a[target="_blank"]')) .forEach(link => link.removeAttribute('target'));

This script works with the Windows extension but not with the Android app.
Why?
 

gobekli

New Member
I use the Adguard app (Version 2.12.247) from your site and I have the proxy mode enabled. My device is a Sony Z4 tablet with Marshmallow 6.0.1
Can you reproduce the behavior?
 

Alex302

Filters Developer
Staff member
Administrator
Please check
Code:
#%#AG_onLoad(function() { Array.from(document.querySelectorAll('a[target="_blank"]')) .forEach(link => link.removeAttribute('target')); });
 
Top