diff --git a/src/options.html b/src/options.html
new file mode 100644
index 0000000..0443bd8
--- /dev/null
+++ b/src/options.html
@@ -0,0 +1,15 @@
+
+
+
Tab Tidy — Options
+
+ Tab Tidy Settings
+
+
+
+
diff --git a/src/options.js b/src/options.js
new file mode 100644
index 0000000..387582f
--- /dev/null
+++ b/src/options.js
@@ -0,0 +1,12 @@
+// Options page — sort mode persistence
+const SORT_KEY = 'tabTidy_sortMode';
+
+document.addEventListener('DOMContentLoaded', () => {
+ const select = document.getElementById('sortMode');
+ chrome.storage.local.get(SORT_KEY, (result) => {
+ select.value = result[SORT_KEY] || 'alpha';
+ });
+ select.addEventListener('change', () => {
+ chrome.storage.local.set({ [SORT_KEY]: select.value });
+ });
+});