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.'); + }); +});