Suppress warnings

This commit is contained in:
ckcz123 2020-06-12 21:45:57 +08:00
parent 12d134b1dc
commit 1b1b46fa6d
7 changed files with 15 additions and 7 deletions

View File

@ -2634,6 +2634,10 @@
}
if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation
options.indent = 1; // JSHint default value is 4
options.asi = true; // Suppress "missing semicolon"
options.shadow = true; // Suppress "variable is already defined"
options.eqnull = true; // Suppress "compare with null"
options.maxerr = 1000;
JSHINT(text, options, options.globals);
var errors = JSHINT.data().errors, result = [];
if (errors) parseErrors(errors, result);

File diff suppressed because one or more lines are too long

View File

@ -45,7 +45,7 @@
</script>
<!-- injection -->
<div id='gameGroup'>
<p id='mainTips'>请稍...</p>
<p id='mainTips'>请稍...</p>
<img id='musicBtn'>
<div id='startPanel'>
<div id='startTop'>

View File

@ -2305,7 +2305,7 @@ actions.prototype._clickStorageRemove_all = function () {
core.drawText("\t[操作成功]你的所有存档已被清空。");
};
if (core.platform.useLocalForage) {
core.ui.drawWaiting("正在清空,请稍...");
core.ui.drawWaiting("正在清空,请稍...");
localforage.clear(done);
}
else {
@ -2331,7 +2331,7 @@ actions.prototype._clickStorageRemove_current = function () {
core.drawText("\t[操作成功]当前塔的存档已被清空。");
}
if (core.platform.useLocalForage) {
core.ui.drawWaiting("正在清空,请稍...");
core.ui.drawWaiting("正在清空,请稍...");
Object.keys(core.saves.ids).forEach(function (v) {
core.removeLocalForage("save" + v);
});

View File

@ -1801,7 +1801,7 @@ control.prototype._doSL_replayRemain_afterGet = function (id, data) {
////// 同步存档到服务器 //////
control.prototype.syncSave = function (type) {
core.ui.drawWaiting("正在同步,请稍...");
core.ui.drawWaiting("正在同步,请稍...");
var callback = function (saves) {
core.control._syncSave_http(type, saves);
}
@ -1839,7 +1839,7 @@ control.prototype.syncLoad = function () {
core.drawText("不合法的存档编号+密码应当为6位数字+4位数字字母的组合如\r[yellow]123456abcd\r。");
return;
}
core.ui.drawWaiting("正在同步,请稍...");
core.ui.drawWaiting("正在同步,请稍...");
core.control._syncLoad_http(idpassword.substring(0, 6), idpassword.substring(6));
});
}

View File

@ -60,7 +60,7 @@ loader.prototype._load_async = function (callback) {
}
if (allTotal > 0) {
if (allLoaded == allTotal) {
core.loader._setStartLoadTipText("正在处理资源文件... 请稍...");
core.loader._setStartLoadTipText("正在处理资源文件... 请稍...");
} else {
core.loader._setStartLoadTipText('正在加载资源文件... ' +
core.formatSize(allLoaded) + " / " + core.formatSize(allTotal) +

View File

@ -781,6 +781,10 @@ utils.prototype.rand2 = function (num) {
var action = core.status.replay.toReplay.shift();
if (action.indexOf("random:") == 0) {
value = parseInt(action.substring(7));
if (isNaN(value) || value >= num) {
core.control._replay_error(action);
return 0;
}
}
else {
core.control._replay_error(action);