mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 06:54:11 +08:00
修改全部删除按钮的逻辑
This commit is contained in:
parent
c6c8caca34
commit
98fc4e5750
@ -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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user