mirror of https://github.com/gorhill/uBlock.git
minor code review
This commit is contained in:
parent
95899a0d1d
commit
a42513aa2f
|
@ -1,3 +1,3 @@
|
||||||
## uBlock Origin pages
|
## uBlock Origin pages
|
||||||
|
|
||||||
HTML: <http://gorhill.github.io/uBlock/>.
|
HTML: <https://gorhill.github.io/uBlock/>.
|
|
@ -477,11 +477,12 @@ const hnTrieManager = {
|
||||||
// location, and consequently so will be the related WASM file.
|
// location, and consequently so will be the related WASM file.
|
||||||
let workingDir;
|
let workingDir;
|
||||||
{
|
{
|
||||||
const url = document.currentScript.src;
|
const url = new URL(document.currentScript.src);
|
||||||
const match = /[^\/]+$/.exec(url);
|
const match = /[^\/]+$/.exec(url.pathname);
|
||||||
workingDir = match !== null
|
if ( match !== null ) {
|
||||||
? url.slice(0, match.index)
|
url.pathname = url.pathname.slice(0, match.index);
|
||||||
: '';
|
}
|
||||||
|
workingDir = url.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
const memory = new WebAssembly.Memory({ initial: 1 });
|
const memory = new WebAssembly.Memory({ initial: 1 });
|
||||||
|
|
Loading…
Reference in New Issue