From 1747742963e80c4dafabe0fc60893c27ffcd4ee1 Mon Sep 17 00:00:00 2001 From: Giteadmin Date: Sun, 10 Sep 2023 18:13:06 +0200 Subject: [PATCH] Upload files to "MantisHelperPlugin" --- MantisHelperPlugin/options.html | 64 +++++++++++++++++++++++++++++++++ MantisHelperPlugin/options.js | 13 +++++++ 2 files changed, 77 insertions(+) create mode 100644 MantisHelperPlugin/options.html create mode 100644 MantisHelperPlugin/options.js diff --git a/MantisHelperPlugin/options.html b/MantisHelperPlugin/options.html new file mode 100644 index 0000000..cfa90b9 --- /dev/null +++ b/MantisHelperPlugin/options.html @@ -0,0 +1,64 @@ + + + + Options + + + +
+

Mantis Helper Options

+

+ + + +
+ + + diff --git a/MantisHelperPlugin/options.js b/MantisHelperPlugin/options.js new file mode 100644 index 0000000..00d5bb7 --- /dev/null +++ b/MantisHelperPlugin/options.js @@ -0,0 +1,13 @@ +document.addEventListener('DOMContentLoaded', () => { + chrome.storage.sync.get(['customUrl'], (result) => { + document.getElementById('customUrl').value = result.customUrl || 'https://example.com/view.php?id='; + }); +}); + +document.getElementById('optionsForm').addEventListener('submit', (e) => { + e.preventDefault(); + const customUrl = document.getElementById('customUrl').value; + chrome.storage.sync.set({ customUrl }, () => { + alert('Options saved.'); + }); +});