aboutsummaryrefslogtreecommitdiff
path: root/common/gen_unique.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-06-30 14:12:43 +0200
committerWojtek Kosior <koszko@koszko.org>2021-06-30 14:13:04 +0200
commitcd5272acb47a53ad71e5a6bcbcb4f712bdd285c5 (patch)
tree625f92362000c483719a8b1fb70c23979a8dba60 /common/gen_unique.js
parent261548ff184926567a623e90df7954aeef842d59 (diff)
downloadbrowser-extension-cd5272acb47a53ad71e5a6bcbcb4f712bdd285c5.tar.gz
browser-extension-cd5272acb47a53ad71e5a6bcbcb4f712bdd285c5.zip
refactor 3 miscellaneous fnctionalities to a their single own file
Diffstat (limited to 'common/gen_unique.js')
-rw-r--r--common/gen_unique.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/common/gen_unique.js b/common/gen_unique.js
deleted file mode 100644
index 7ec8b4a..0000000
--- a/common/gen_unique.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Myext generating unique, per-site hash
- *
- * Copyright (C) 2021 Wojtek Kosior
- * Redistribution terms are gathered in the `copyright' file.
- */
-
-/*
- * IMPORTS_START
- * IMPORT sha256
- * IMPORT browser
- * IMPORT is_chrome
- * IMPORTS_END
- */
-
-function get_id()
-{
- if (is_chrome)
- return browser.runtime.getManifest().key.substring(0, 50);
- else
- return browser.runtime.getURL("dummy");
-}
-
-function gen_unique(url)
-{
- return "#" + sha256(get_id() + url);
-}
-
-/*
- * EXPORTS_START
- * EXPORT gen_unique
- * EXPORTS_END
- */