mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00: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
1 changed files with 2 additions and 2 deletions
|
|
@ -1858,13 +1858,13 @@ const onMessage = function(request, sender, callback) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'subscribeTo':
|
case 'subscribeTo':
|
||||||
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/1797
|
||||||
|
if ( /^(file|https?):\/\//.test(request.location) === false ) { break; }
|
||||||
const url = encodeURIComponent(request.location);
|
const url = encodeURIComponent(request.location);
|
||||||
const title = encodeURIComponent(request.title);
|
const title = encodeURIComponent(request.title);
|
||||||
const hash = µb.selectedFilterLists.indexOf(request.location) !== -1
|
const hash = µb.selectedFilterLists.indexOf(request.location) !== -1
|
||||||
? '#subscribed'
|
? '#subscribed'
|
||||||
: '';
|
: '';
|
||||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1797
|
|
||||||
if ( /^(file|https?):\/\//.test(url) === false ) { break; }
|
|
||||||
vAPI.tabs.open({
|
vAPI.tabs.open({
|
||||||
url: `/asset-viewer.html?url=${url}&title=${title}&subscribe=1${hash}`,
|
url: `/asset-viewer.html?url=${url}&title=${title}&subscribe=1${hash}`,
|
||||||
select: true,
|
select: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue