Commit 980125b 1 parent 6ea3338 commit 980125b Copy full SHA for 980125b
File tree 3 files changed +7
-8
lines changed
3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -375,11 +375,8 @@ vAPI.tabs.open = function(details) {
375
375
// "Note that fragment identifiers are not matched."
376
376
// It's a lie, fragment identifiers ARE matched. So we need to remove the
377
377
// fragment.
378
- var targetURLWithoutHash = targetURL ;
379
378
var pos = targetURL . indexOf ( '#' ) ;
380
- if ( pos !== - 1 ) {
381
- targetURLWithoutHash = targetURL . slice ( 0 , pos ) ;
382
- }
379
+ var targetURLWithoutHash = pos === - 1 ? targetURL : targetURL . slice ( 0 , pos ) ;
383
380
384
381
chrome . tabs . query ( { url : targetURLWithoutHash } , function ( tabs ) {
385
382
var tab = tabs [ 0 ] ;
Original file line number Diff line number Diff line change @@ -470,8 +470,9 @@ var uBlockCollapser = (function() {
470
470
if ( shadow !== null && shadow . className === sessionId ) {
471
471
continue ;
472
472
}
473
- // https://github.com/w3c/webcomponents/issues/102
474
- // not all nodes can be shadowed
473
+ // https://github.com/gorhill/uBlock/pull/555
474
+ // Not all nodes can be shadowed:
475
+ // https://github.com/w3c/webcomponents/issues/102
475
476
try {
476
477
shadow = elem . createShadowRoot ( ) ;
477
478
shadow . className = sessionId ;
Original file line number Diff line number Diff line change @@ -181,8 +181,9 @@ var hideElements = function(selectors) {
181
181
if ( shadow !== null && shadow . className === sessionId ) {
182
182
continue ;
183
183
}
184
- // https://github.com/w3c/webcomponents/issues/102
185
- // not all nodes can be shadowed
184
+ // https://github.com/gorhill/uBlock/pull/555
185
+ // Not all nodes can be shadowed:
186
+ // https://github.com/w3c/webcomponents/issues/102
186
187
try {
187
188
shadow = elem . createShadowRoot ( ) ;
188
189
shadow . className = sessionId ;
You can’t perform that action at this time.
0 commit comments