更新(20191212)

This commit is contained in:
2019-12-12 00:19:45 +08:00
parent f2fb5425ca
commit d0f5d34c8f
19 changed files with 3261 additions and 5 deletions

263
tool.html Normal file
View File

@@ -0,0 +1,263 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" href="favicon.ico" />
<title>Frost 网址导航 - 小工具</title>
<link rel="stylesheet" href="css/all.css" />
<link rel="stylesheet" href="css/tool.css" />
</head>
<body>
<div class="main">
<!-- 索引 -->
<div class="tool-nav">
<header>索引</header>
<div class="tool-nav-link">
<ul>
<li><a href="index.html">主页</a></li>
<li><a href="#tool-unixtime">Unix 时间戳转换</a></li>
<li><a href="#tool-downloadtime">计算下载用时</a></li>
<li><a href="#tool-calculate">简易计算</a></li>
<li><a href="#tool-genlink">生成批量下载链接</a></li>
<li><a href="#tool-genstring">生成随机字符串</a></li>
<li><a href="#tool-newwindow">新窗口(小窗)中打开</a></li>
<li><a href="#tool-runjs">运行 JavaScript</a></li>
</ul>
</div>
</div>
<!-- 字体大小 -->
<div class="tool-settings">
<header>字体大小</header>
<div class="tool-setting-font">
<p>
<b>当前:</b><label>16</label>
</p>
<p>
<b>调整:</b><span></span>
<input type="range" min="12" max="40" step="1" value="16" oninput="toolSettingsFont('show')" />
<span></span>
</p>
<hr />
<div class="tool-button">
<div onclick="toolSettingsFont('set')">设置</div>
<div onclick="toolSettingsFont('reset')">重置</div>
</div>
</div>
</div>
<!-- Unix 时间戳转换 -->
<div id="tool-unixtime">
<header>Unix 时间戳转换</header>
<!-- 时间戳转换为时间 -->
<p>时间戳转换为北京时间</p>
<!-- 输入框 -->
<div id="tool-unixtime-input-a">
<span>Unix 时间戳:</span><input type="text" />
</div>
<!-- 输出框 -->
<div id="tool-unixtime-output-a">
<span>时间:</span><input type="text" readonly />
</div>
<!-- 模式 -->
<div class="tool-unixtime-setting-a">
<span>模式:</span>
<input type="radio" name="unixtime-setting-a" id="unixtime-setting-aa" />
<label for="unixtime-setting-aa">秒(s)</label>
<input type="radio" name="unixtime-setting-a" id="unixtime-setting-ab" checked />
<label for="unixtime-setting-ab">毫秒(ms)</label>
</div>
<hr />
<!-- 时间转换为时间戳 -->
<p>北京时间转换为时间戳</p>
<!-- 输入框 -->
<div id="tool-unixtime-input-b">
<span>时间:</span><input type="text" />
</div>
<!-- 输出框 -->
<div id="tool-unixtime-output-b">
<span>Unix 时间戳:</span><input type="text" readonly />
</div>
<!-- 模式 -->
<div class="tool-unixtime-setting-b">
<span>模式:</span>
<input type="radio" name="unixtime-setting-b" id="unixtime-setting-ba" checked />
<label for="unixtime-setting-ba">秒(s)</label>
<input type="radio" name="unixtime-setting-b" id="unixtime-setting-bb" />
<label for="unixtime-setting-bb">毫秒(ms)</label>
</div>
<hr />
<!-- 按钮 -->
<div class="tool-button">
<div onclick="toolUnixTimeNow()">当前</div>
<div onclick="toolUnixTimeSubmit()">转换</div>
<div onclick="toolUnixTimeClear()">重置</div>
</div>
</div>
<!-- 计算下载用时 -->
<div id="tool-downloadtime">
<header>计算下载用时(未完成)</header>
<!-- 输入 -->
<div id="tool-downloadtime-input">
<p>
<b>文件大小:</b><input type="text" />
</p>
<p>
<b>下载速度:</b><input type="text" />
</p>
</div>
<hr />
<!-- 结果 -->
<div id="tool-downloadtime-output">
<b>大约用时:</b><span>待计算</span>
</div>
<hr />
<!-- 按钮 -->
<div class="tool-button">
<div onclick="toolDownloadTimeSubmit()">计算</div>
<div onclick="toolDownloadTimeClear()">重置</div>
</div>
<hr />
<!-- 帮助 -->
<div id="tool-downloadtime-help">
<p><b>文件大小</b></p>
<p>数值 + 单位B / KB / MB / GB / TB</p>
<p>例如2 KB、5.5 GB</p>
<p><b>下载速度(每秒)</b></p>
<p>数值 + 单位B / KB / MB / GB / TB</p>
<p>例如2 KB、5.5 GB</p>
</div>
</div>
<!-- 简易计算 -->
<div id="tool-calculate">
<header>简易计算</header>
<textarea id="tool-calculate-input" rows="8" placeholder="请输入算式(请使用“半角”符号)&#10;注意:受浮点精度影响,结果仅供参考&#10;加:+ 减:- 乘:* 除:/&#10;多层括号:仅需使用 ()&#10;乘方运算:幂(底数, 指数)&#10;平方根:平方根(数值或算式)"></textarea>
<div>保留小数点后 <input id="tool-calculate-tofixed" type="text" title="0 ~ 16 之间默认4" value="4" /> 位数</div>
<div id="tool-calculate-result">结果:<span></span></div>
<hr />
<div class="tool-button">
<div onclick="toolCalculateSubmit()">计算</div>
<div onclick="toolCalculateClear()">清空</div>
</div>
</div>
<!-- 生成批量下载链接 -->
<div id="tool-genlink">
<header>生成批量下载链接</header>
<div id="tool-genlink-link">
<span>网址:</span>
<input type="text" placeholder="变量用 (*) 表示" />
</div>
<hr />
<div id="tool-genlink-settings">
<div id="tool-genlink-settings-a">
<p>
<input type="radio" name="genlink-settings" id="genlink-settings-a" checked />
<label for="genlink-settings-a">等差数列</label>
首项:<input type="text" value="1" />
项数:<input type="text" value="5" />
公差:<input type="text" value="1" />
</p>
<p>
<input type="checkbox" name="genlink-settings-a-reverse" id="genlink-settings-a-zero" />
<label for="genlink-settings-a-zero">补0暂不支持负数&nbsp;</label>
<input type="checkbox" name="genlink-settings-a-reverse" id="genlink-settings-a-reverse" />
<label for="genlink-settings-a-reverse">倒序</label>
</p>
</div>
<hr />
<div id="tool-genlink-settings-b">
<p>
<input type="radio" name="genlink-settings" id="genlink-settings-b" />
<label for="genlink-settings-b">等比数列</label>
首项:<input type="text" value="1" />
项数:<input type="text" value="5" />
公比:<input type="text" value="2" />
</p>
<p>
<input type="checkbox" name="genlink-settings-b-reverse" id="genlink-settings-b-zero" />
<label for="genlink-settings-b-zero">补0暂不支持负数&nbsp;</label>
<input type="checkbox" name="genlink-settings-b-reverse" id="genlink-settings-b-reverse" />
<label for="genlink-settings-b-reverse">倒序</label>
</p>
</div>
<hr />
<div id="tool-genlink-settings-c">
<p>
<input type="radio" name="genlink-settings" id="genlink-settings-c" />
<label for="genlink-settings-c">字母变化</label>
从:<input type="text" value="a" maxlength="1" />
到:<input type="text" value="z" maxlength="1" />
<input type="checkbox" name="genlink-settings-c-reverse" id="genlink-settings-c-reverse" />
<label for="genlink-settings-c-reverse">倒序</label>
</p>
</div>
</div>
<hr />
<div class="tool-button">
<div onclick="toolGenLinkSubmit()">生成</div>
<div onclick="toolGenLinkClear()">清空</div>
</div>
<hr />
<textarea id="tool-genlink-result" rows="8" placeholder="结果"></textarea>
</div>
<!-- 生成随机字符串 -->
<div id="tool-genstring">
<header>生成随机字符串(未完成)</header>
<div id="genstring-settings">
<p><b>选项</b></p>
<p>
<input type="checkbox" id="genstring-setting-a" checked /><label for="genstring-setting-a"> 数字</label>
<input type="checkbox" id="genstring-setting-b" /><label for="genstring-setting-b"> 字母</label>
<input type="checkbox" id="genstring-setting-c" /><label for="genstring-setting-c"> 其他符号</label>
<input type="checkbox" id="genstring-setting-d" checked /><label for="genstring-setting-d"> 大小写</label>
</p>
<p>
<input type="checkbox" id="genstring-setting-e" /><label for="genstring-setting-e"> 全小写(选中“大小写”时起作用)</label>
</p>
</div>
<hr />
<div id="genstring-result">
<b>结果:</b><input type="text" />
</div>
<hr />
<div class="tool-button">
<div onclick="">生成</div>
</div>
</div>
<!-- 新窗口(小窗)中打开 -->
<div id="tool-newwindow">
<header>新窗口(小窗)中打开</header>
<div id="tool-newwindow-link">
<span>网址:</span>
<input type="text" placeholder="需包含协议(例如 https://" />
</div>
<div id="tool-newwindow-meta">
<span>大小:</span>
<input type="text" placeholder="宽度(默认 400" />
<input type="text" placeholder="高度(默认 300" />
</div>
<hr />
<div class="tool-button">
<div onclick="toolNewWindowSubmit()">打开</div>
<div onclick="toolNewWindowClear()">清空</div>
</div>
</div>
<!-- 运行 JavaScript -->
<div id="tool-runjs">
<header>运行 JavaScript</header>
<textarea id="tool-runjs-input" rows="8" placeholder="请输入 JavaScript 代码"></textarea>
<hr />
<div class="tool-button">
<div onclick="toolRunJSSubmit()">运行</div>
<div onclick="toolRunJSClear()">清空</div>
</div>
</div>
</div>
<!-- 返回顶部 -->
<div class="to-top" onclick="document.body.scrollTop = 0; document.documentElement.scrollTop = 0;"></div>
<!-- 背景 -->
<div class="page-background"></div>
<!-- JavaScript -->
<script src="js/tool.min.js"></script>
</body>
</html>