From 0499df10397a2aad34d9f1dbe4d994743b18ffdc Mon Sep 17 00:00:00 2001 From: eight04 Date: Thu, 30 Dec 2021 16:30:36 +0800 Subject: [PATCH] Change: styles.order -> injectionOrder --- background/style-manager.js | 2 +- execution-order/execution-order.js | 4 ++-- js/prefs.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/background/style-manager.js b/background/style-manager.js index a46e1f4c..003f7cd5 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -72,7 +72,7 @@ const styleMan = (() => { } }); - prefs.subscribe(['styles.order'], (key, value) => { + prefs.subscribe(['injectionOrder'], (key, value) => { order = {}; value.forEach((uid, i) => { const id = uuidIndex.get(uid); diff --git a/execution-order/execution-order.js b/execution-order/execution-order.js index 91aaaa4e..52b9cd7d 100644 --- a/execution-order/execution-order.js +++ b/execution-order/execution-order.js @@ -21,7 +21,7 @@ const [item] = list.splice(e.detail.originalIndex, 1); list.splice(e.detail.spliceIndex, 0, item); ol.insertBefore(e.detail.dragTarget, e.detail.insertBefore); - prefs.set('styles.order', list.map(l => l.style._id)); + prefs.set('injectionOrder', list.map(l => l.style._id)); }); new DraggableList(ol, {scrollContainer: ol}); document.querySelector('#main').classList.add('ready'); @@ -49,7 +49,7 @@ uuidIndex.set(s._id, s); } const orderedStyles = []; - for (const uid of prefs.get('styles.order')) { + for (const uid of prefs.get('injectionOrder')) { const s = uuidIndex.get(uid); if (s) { uuidIndex.delete(uid); diff --git a/js/prefs.js b/js/prefs.js index cfd86acf..2158aa0a 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -127,7 +127,7 @@ 'updateInterval': 24, // user-style automatic update interval, hours (0 = disable) - 'styles.order': [], + 'injectionOrder': [], }; const knownKeys = Object.keys(defaults); /** @type {PrefsValues} */