mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-24 11:22:44 +01:00
Improve urlskip=
filter option
Automatically upgrade `http:` to `https:` in the resulting URL. Related feedback: https://github.com/uBlockOrigin/uBlock-issues/issues/3206#issuecomment-2480930555
This commit is contained in:
parent
114acacd2e
commit
77ed83ff2f
@ -5533,7 +5533,10 @@ function urlSkip(directive, url, blocked, steps) {
|
||||
return;
|
||||
}
|
||||
const urlfinal = new URL(urlout);
|
||||
if ( urlfinal.protocol !== 'https:' ) { return; }
|
||||
if ( urlfinal.protocol !== 'https:' ) {
|
||||
if ( urlfinal.protocol !== 'http:' ) { return; }
|
||||
urlout = urlout.replace('http', 'https');
|
||||
}
|
||||
if ( blocked && redirectBlocked !== true ) { return; }
|
||||
return urlout;
|
||||
} catch(x) {
|
||||
|
Loading…
Reference in New Issue
Block a user