From 7f368d46ea06164da025c1ac4ed9a65ad23b25ef Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 12 May 2021 16:00:09 +0200 Subject: stop using js modules --- common/connection_types.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 common/connection_types.js (limited to 'common/connection_types.js') diff --git a/common/connection_types.js b/common/connection_types.js new file mode 100644 index 0000000..a01a777 --- /dev/null +++ b/common/connection_types.js @@ -0,0 +1,25 @@ +/** +* Myext background scripts message connection types "enum" +* +* Copyright (C) 2021 Wojtek Kosior +* +* Dual-licensed under: +* - 0BSD license +* - GPLv3 or (at your option) any later version +*/ + +"use strict"; + +/* + * Those need to be strings so they can be used as 'name' parameter + * to browser.runtime.connect() + */ + +(() => { + const CONNECTION_TYPE = { + REMOTE_STORAGE : "0", + PAGE_ACTIONS : "1" + }; + + window.CONNECTION_TYPE = CONNECTION_TYPE; +})(); -- cgit v1.2.3