Skip to content

Commit 319e973

Browse files
author
John
committed
fix refresh-config
1 parent 1d9aada commit 319e973

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

js/cloudopt-option.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,12 @@
130130
theme: "mint",
131131
timeout: 1000
132132
}).show();
133-
refresh();
134-
cloudopt.message.send("refresh-config");
135-
$("#whiteListInput").val("");
133+
var config = cloudopt.config.get();
134+
cloudopt.config.set(config, function () {
135+
refresh();
136+
cloudopt.message.send("refresh-config");
137+
$("#whiteListInput").val("");
138+
});
136139
}
137140
})
138141
});
@@ -156,9 +159,12 @@
156159
theme: "mint",
157160
timeout: 1000
158161
}).show();
159-
refresh();
160-
cloudopt.message.send("refresh-config");
161-
$("#whiteListAdsInput").val("");
162+
var config = cloudopt.config.get();
163+
cloudopt.config.set(config, function () {
164+
refresh();
165+
cloudopt.message.send("refresh-config");
166+
$("#whiteListAdsInput").val("");
167+
});
162168
}
163169
})
164170
});
@@ -181,9 +187,12 @@
181187
theme: "mint",
182188
timeout: 1000
183189
}).show();
184-
refresh();
185-
cloudopt.message.send("refresh-config");
186-
$("#blackListInput").val("");
190+
var config = cloudopt.config.get();
191+
cloudopt.config.set(config, function () {
192+
refresh();
193+
cloudopt.message.send("refresh-config");
194+
$("#blackListInput").val("");
195+
});
187196
}
188197
})
189198
});

option.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ <h2 class="mdl-card__title-text" i18n="optionCustomRule">自定义规则列表</
394394
</div>
395395
</div>
396396

397-
<div class="mdl-card mdl-shadow--2dp" id="white-lis">
397+
<div class="mdl-card mdl-shadow--2dp" id="white-list">
398398
<div class="mdl-card__title">
399399
<h2 class="mdl-card__title-text" i18n="optionClassifyWhiteList">云安全白名单</h2>
400400
</div>

0 commit comments

Comments
 (0)