File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2222,8 +2222,8 @@ builtinScriptlets.push({
2222
2222
} ) ;
2223
2223
// https://github.com/uBlockOrigin/uAssets/issues/913
2224
2224
function disableNewtabLinks ( ) {
2225
- document . addEventListener ( 'click' , function ( ev ) {
2226
- var target = ev . target ;
2225
+ document . addEventListener ( 'click' , ev => {
2226
+ let target = ev . target ;
2227
2227
while ( target !== null ) {
2228
2228
if ( target . localName === 'a' && target . hasAttribute ( 'target' ) ) {
2229
2229
ev . stopPropagation ( ) ;
@@ -2232,7 +2232,7 @@ function disableNewtabLinks() {
2232
2232
}
2233
2233
target = target . parentNode ;
2234
2234
}
2235
- } ) ;
2235
+ } , { capture : true } ) ;
2236
2236
}
2237
2237
2238
2238
/******************************************************************************/
You can’t perform that action at this time.
0 commit comments