mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Fix bad test breaking list subscription
Related issue/feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1797#issuecomment-965150304
This commit is contained in:
parent
3b53c3a3e3
commit
c2c2cef4e6
@ -1858,13 +1858,13 @@ const onMessage = function(request, sender, callback) {
|
||||
break;
|
||||
|
||||
case 'subscribeTo':
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1797
|
||||
if ( /^(file|https?):\/\//.test(request.location) === false ) { break; }
|
||||
const url = encodeURIComponent(request.location);
|
||||
const title = encodeURIComponent(request.title);
|
||||
const hash = µb.selectedFilterLists.indexOf(request.location) !== -1
|
||||
? '#subscribed'
|
||||
: '';
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1797
|
||||
if ( /^(file|https?):\/\//.test(url) === false ) { break; }
|
||||
vAPI.tabs.open({
|
||||
url: `/asset-viewer.html?url=${url}&title=${title}&subscribe=1${hash}`,
|
||||
select: true,
|
||||
|
Loading…
Reference in New Issue
Block a user