diff --git a/assets/options.js b/assets/options.js index b1ee655..dd4c29a 100644 --- a/assets/options.js +++ b/assets/options.js @@ -67,7 +67,8 @@ window.saveFile(options, JSON.stringify(json)); clearAll = () => { window.messageBox({ type: 'question', icon: window.logo, message: "将会清空所有命令,请确认!", buttons: ['手抖...', '确定!'] }, index => { if (index) { - utools.db.remove('customFts') + utools.db.remove('customFts'); + clearAllFeatures(); showOptions(); } }) @@ -304,6 +305,12 @@ typeCheck = () => { } } +clearAllFeatures = () => { + for (var fts of utools.getFeatures()) { + utools.removeFeature(fts.code) + } +} + // 开关 $("#options").on('change', 'input[type=checkbox]', function () { var customFts = getCustomFts(),