diff options
author | Jesús <heckyel@hyperbola.info> | 2022-04-06 10:38:06 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-04-06 10:38:06 +0800 |
commit | 8aeb670be1d252807252ee2bfe99b15b81c3e28d (patch) | |
tree | ced0973165449d620c5c40876c37ab16b17655f9 /lib/HostMap.jsm | |
parent | 5aa99a2ea2b683ba35eb36dfc54efd79f3cfcb85 (diff) | |
download | ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.tar.lz ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.tar.xz ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.zip |
update from upstream
Diffstat (limited to 'lib/HostMap.jsm')
-rw-r--r-- | lib/HostMap.jsm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/HostMap.jsm b/lib/HostMap.jsm index fddace9..3665ca9 100644 --- a/lib/HostMap.jsm +++ b/lib/HostMap.jsm @@ -2,7 +2,7 @@ ηMatrix - a browser extension to black/white list requests. Copyright (C) 2014-2019 The uMatrix/uBlock Origin authors - Copyright (C) 2019-2020 Alessio Vanni + Copyright (C) 2020 Alessio Vanni This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see {http://www.gnu.org/licenses/}. - Home: https://libregit.spks.xyz/heckyel/ematrix + Home: https://gitlab.com/vannilla/ematrix uMatrix Home: https://github.com/gorhill/uMatrix */ @@ -31,22 +31,22 @@ var map = new Map(); var HostMap = { put: function (key, value) { - if (typeof key !== 'string' || !(value instanceof Ci.nsIURI) - || !key || !value) { - throw new Error('invalid argument(s)'); - } + if (typeof key !== 'string' || !(value instanceof Ci.nsIURI) + || !key || !value) { + throw new Error('invalid argument(s)'); + } - if (map.get(key)) { - return; - } + if (map.get(key)) { + return; + } - map.set(key, value); + map.set(key, value); }, get: function (key) { - if (typeof key !== 'string' || !key) { - throw new Error('invalid argument'); - } + if (typeof key !== 'string' || !key) { + throw new Error('invalid argument'); + } - return map.get(key); + return map.get(key); }, }; |