From 1f7b19512cfa7e1b153b99d6a2b40bad82a5496e Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 26 Apr 2018 17:13:34 +0200 Subject: js: created TestExtension and smaller fixes -- * Extensions: - Moved testapplication to Demoextension - Created BrowserTestExtension. Includes mocha and chai. For running tests that cannot be run outside a WebExtension Both Extensions can be found zipped in build/extensions after running build_extensions.sh * Code changes: - src/Config: Place for the configuration - small fixes raised during testing in Keyring.js, Message.js, - src/gpgmejs_openpgpjs.js don't offer direct GpgME object to the outside, as it only causes confusion - index.js init() now checks the config for validity * Tests: - Reordered tests in test/. - Input values are now in a separate file which may be of use for bulk testing * moved the build directory from dist to build --- lang/js/DemoExtension/entry.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lang/js/DemoExtension/entry.js (limited to 'lang/js/DemoExtension/entry.js') diff --git a/lang/js/DemoExtension/entry.js b/lang/js/DemoExtension/entry.js new file mode 100644 index 00000000..7e5e1ffe --- /dev/null +++ b/lang/js/DemoExtension/entry.js @@ -0,0 +1,25 @@ +/* gpgme.js - Javascript integration for gpgme + * Copyright (C) 2018 Bundesamt für Sicherheit in der Informationstechnik + * + * This file is part of GPGME. + * + * GPGME is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * GPGME is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see . + * SPDX-License-Identifier: LGPL-2.1+ + * + */ +document.addEventListener('DOMContentLoaded', function() { + chrome.tabs.create({ + url: './uimainui.html' + }); +}); -- cgit v1.2.3 From f45b926816340d3cca37f013a9eb1b1d9cdb0cfe Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 26 Apr 2018 17:59:40 +0200 Subject: js: fixed wrong paths in DemoExtension -- * Some forgotten internal links after the move to a subdir and cleaning --- lang/js/DemoExtension/entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/js/DemoExtension/entry.js') diff --git a/lang/js/DemoExtension/entry.js b/lang/js/DemoExtension/entry.js index 7e5e1ffe..62583421 100644 --- a/lang/js/DemoExtension/entry.js +++ b/lang/js/DemoExtension/entry.js @@ -20,6 +20,6 @@ */ document.addEventListener('DOMContentLoaded', function() { chrome.tabs.create({ - url: './uimainui.html' + url: './mainui.html' }); }); -- cgit v1.2.3 From bfd3799d39df265882deedeee083fd5246a2f35d Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 6 Jun 2018 13:05:53 +0200 Subject: js: code cleanup (eslint) -- * trying to stick to eslint from now on for readability * As some attribution was lost in previous git confusions, I added my name into some of the licence headers --- lang/js/DemoExtension/entry.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lang/js/DemoExtension/entry.js') diff --git a/lang/js/DemoExtension/entry.js b/lang/js/DemoExtension/entry.js index 62583421..77b96f92 100644 --- a/lang/js/DemoExtension/entry.js +++ b/lang/js/DemoExtension/entry.js @@ -17,7 +17,12 @@ * License along with this program; if not, see . * SPDX-License-Identifier: LGPL-2.1+ * + * Author(s): + * Maximilian Krambach */ + +/* global chrome */ + document.addEventListener('DOMContentLoaded', function() { chrome.tabs.create({ url: './mainui.html' -- cgit v1.2.3 From dd32daad0bb21e3d5567326d0b2e548ff8510431 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Mon, 20 Aug 2018 15:12:01 +0200 Subject: js: add and apply eslint rules -- * mainly spacing, see .eslintrc.json for details --- lang/js/DemoExtension/entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/js/DemoExtension/entry.js') diff --git a/lang/js/DemoExtension/entry.js b/lang/js/DemoExtension/entry.js index 77b96f92..fd261a0b 100644 --- a/lang/js/DemoExtension/entry.js +++ b/lang/js/DemoExtension/entry.js @@ -23,7 +23,7 @@ /* global chrome */ -document.addEventListener('DOMContentLoaded', function() { +document.addEventListener('DOMContentLoaded', function () { chrome.tabs.create({ url: './mainui.html' }); -- cgit v1.2.3