diff options
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); }, }; |