更新(20191204)
This commit is contained in:
10
docs/js/tool.min.js
vendored
10
docs/js/tool.min.js
vendored
@@ -10,7 +10,7 @@ function toolUnixTimeNow(){var GetInputA=document.getElementById("tool-unixtime-
|
||||
GetInputB.value=toolUnixTimeToTime(new Date().getTime(),true);}
|
||||
function toolUnixTimeSubmit(){var GetInputA=document.getElementById("tool-unixtime-input-a").getElementsByTagName("input")[0];var GetInputB=document.getElementById("tool-unixtime-input-b").getElementsByTagName("input")[0];var GetOutputA=document.getElementById("tool-unixtime-output-a").getElementsByTagName("input")[0];var GetOutputB=document.getElementById("tool-unixtime-output-b").getElementsByTagName("input")[0];var GetSettingAA=document.getElementById("unixtime-setting-aa").checked;var GetSettingAB=document.getElementById("unixtime-setting-ab").checked;var GetSettingBA=document.getElementById("unixtime-setting-ba").checked;var GetSettingBB=document.getElementById("unixtime-setting-bb").checked;if(GetSettingAA==true){GetOutputA.value=toolUnixTimeToTime(GetInputA.value,false);}else if(GetSettingAB==true){GetOutputA.value=toolUnixTimeToTime(GetInputA.value,GetSettingAB);}
|
||||
GetOutputB.value=toolUnixTimeToUnix(GetInputB.value,GetSettingBB);}
|
||||
function toolUnixTimeClear(){document.getElementById("tool-unixtime-input-a").getElementsByTagName("input")[0].value='';document.getElementById("tool-unixtime-input-b").getElementsByTagName("input")[0].value='';document.getElementById("tool-unixtime-output-a").getElementsByTagName("input")[0].value='';document.getElementById("tool-unixtime-output-b").getElementsByTagName("input")[0].value='';}
|
||||
function toolUnixTimeClear(){document.querySelector("#tool-unixtime-input-a input").value='';document.querySelector("#tool-unixtime-input-b input").value='';document.querySelector("#tool-unixtime-output-a input").value='';document.querySelector("#tool-unixtime-output-b input").value='';}
|
||||
function toolCalculateSubmit(){GetInput=document.getElementById("tool-calculate-input");GetToFixed=document.getElementById("tool-calculate-tofixed");GetResult=document.getElementById("tool-calculate-result").getElementsByTagName("span")[0];GetCal=GetInput.value;GetCal=GetCal.replace(/π/g,"Math.PI");GetCal=GetCal.replace(/幂/g,"Math.pow");GetCal=GetCal.replace(/平方根/g,"Math.sqrt");if(GetToFixed.value>=0&&GetToFixed.value<=16){GetResult.innerText=eval(GetCal).toFixed(GetToFixed.value);}else{GetResult.innerText="保留位数有误(0 ~ 16 之间)";}}
|
||||
function toolCalculateClear(){GetInput=document.getElementById("tool-calculate-input");GetInput.value='';GetResult.innerText='';}
|
||||
function toolGenLinkSubmit(){var VarText="(*)";var BaseLink=document.getElementById("tool-genlink-link").getElementsByTagName("input")[0].value;var GetSettingType=document.getElementsByName("genlink-settings");var GetSettingA=document.getElementById("tool-genlink-settings-a").getElementsByTagName("input");var GetSettingB=document.getElementById("tool-genlink-settings-b").getElementsByTagName("input");var GetSettingC=document.getElementById("tool-genlink-settings-c").getElementsByTagName("input");var GetResult=document.getElementById("tool-genlink-result");var LinkReplace='';var LinkResult='';function AddZero(){if(NumLength<NumLastLength){var ZeroMax=NumLastLength-NumLength;for(let i=1;i<=ZeroMax;i++){Num="0"+Num;}}}
|
||||
@@ -19,5 +19,9 @@ if(GetSettingType[0].checked==true){var GetFirst=parseInt(GetSettingA[1].value);
|
||||
Num=String.fromCharCode(i);CheckReverse();}}else if(GetFirst>GetLast){GetResult.placeholder="字母先后顺序有误。\n请按此顺序填写:\nA - Z a - z\n例如:\n从 a 到 d\n从 A 到 D\n从 X 到 g";}else if(GetFirst==GetLast){GetResult.placeholder="仅有 1 条链接,无需生成。";}else{GetResult.placeholder="异常。";}}else{GetResult.placeholder="超出范围。";}}else{GetResult.placeholder="类型选择有误";}
|
||||
GetResult.value=LinkResult;}
|
||||
function toolGenLinkClear(){var GetResult=document.getElementById("tool-genlink-result");GetResult.value='';GetResult.placeholder="结果";}
|
||||
function toolRunJSSubmit(){GetCode=document.getElementById("tool-runjs-input");eval(GetCode.value);}
|
||||
function toolRunJSClear(){GetCode=document.getElementById("tool-runjs-input");GetCode.value='';}
|
||||
function toolNewWindowSubmit(){var link=document.querySelector("#tool-newwindow-link input").value;var width=document.querySelectorAll("#tool-newwindow-meta input")[0].value;var height=document.querySelectorAll("#tool-newwindow-meta input")[1].value;if(width==""){width=400;}
|
||||
if(height==""){height=300;}
|
||||
window.open(link,"_blank","height="+height+", width="+width+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=yes, status=yes");}
|
||||
function toolNewWindowClear(){document.querySelector("#tool-newwindow-link input").value="";document.querySelectorAll("#tool-newwindow-meta input")[0].value="";document.querySelectorAll("#tool-newwindow-meta input")[1].value="";}
|
||||
function toolRunJSSubmit(){var GetCode=document.querySelector("#tool-runjs-input");eval(GetCode.value);}
|
||||
function toolRunJSClear(){var GetCode=document.querySelector("#tool-runjs-input");GetCode.value='';}
|
||||
|
Reference in New Issue
Block a user