取消独立“dev”文件夹

This commit is contained in:
2019-12-12 00:18:34 +08:00
parent 7e7429f745
commit 8094143901
16 changed files with 0 additions and 3007 deletions

View File

@@ -1,113 +0,0 @@
* {
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
/* 背景 */
.page-background {
z-index: -100;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-attachment: fixed;
background-image: url(../img/Unsplash_V6TWE6h8gyg_Blur.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/*
.page-background:after {
content: "";
z-index: -90;
position: inherit;
top: inherit;
left: inherit;
width: inherit;
height: inherit;
background: inherit;
filter: blur(4px);
}
*/
/* 滚动条 */
::-webkit-scrollbar {
height: 8px;
width: 8px;
}
::-webkit-scrollbar-thumb {
background-color: #CCC;
border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
background-color: #03A9F4;
}
::-webkit-scrollbar-track {
background-color: #FFF;
border-radius: 0;
}
/* 选中 */
::selection {
background:#03A9F4;
color:#FFF;
}
::-moz-selection {
background:#03A9F4;
color:#FFF;
}
::-webkit-selection {
background:#03A9F4;
color:#FFF;
}
/* 动画 */
@keyframes spinner {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes FloatingBarSlide {
from {
bottom: -50px;
}
}
@keyframes ToTopAnimation {
0% {
}
50% {
right: 25px;
bottom: 25px;
height: 40px;
width: 40px;
line-height: 40px;
font-size: 20px;
color: #FFF;
}
100% {
color: #2196F3;
transform: rotate(360deg);
}
}
@keyframes ToolPanelShow {
from {
bottom: -110%;
opacity: 0;
}
to {
bottom: 0;
opacity: 1;
}
}

View File

@@ -1,500 +0,0 @@
@charset "UTF-8";
/*
* 默认配色
* primary #4cd964
* accent #5ac8fa
* accent #ff2d55
* background #fff
* text #222
*/
* {
border-radius: 0;
box-sizing: border-box;
font-weight: normal;
outline: none;
user-select: none;
}
body {
background-color: #999;
color: #000;
cursor: default;
display: flex;
flex-direction: column;
font: normal 14px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
justify-content: center;
margin: 6em auto;
max-width: calc(100% - 2em);
min-height: calc(100vh - 8em);
/* text-transform: lowercase; */
width: 30em;
overflow-x: hidden;
scroll-behavior: smooth;
}
a {
color: #222;
text-decoration: none;
transition: 200ms;
}
a:hover {
color: #03A9F4;
}
a:active {
color: #00BCD4;
}
code {
font-family: 'Consolas', monospace;
}
h1, h2, h3 {
font-weight: 500;
text-align: center;
}
h2 {
color: #FFF;
font-size: 1.6em;
margin-bottom: 2em;
position: relative;
text-shadow: 4px 4px 5px rgba(0, 0, 0, 0.2);
}
h2::before {
content: '';
height: 1px;
position: absolute;
width: 100%;
}
h3 {
color: #03A9F4;
font-size: 1.25em;
margin: 2em 0;
}
img {
border: none;
max-width: 100%;
vertical-align: top;
}
p {
margin: 2em 0;
text-align: center;
}
pre {
background: #f6f7f8;
display: block;
line-height: 1.4;
padding: 1em;
user-select: text;
width: 100%;
}
table {
background: #f6f7f8;
border-collapse: collapse;
border-spacing: 0;
margin: 2em 0;
width: 100%;
}
thead tr {
border-bottom: 1px solid rgba(0, 0, 0, 0.025);
}
thead th {
color: #ff2d55;
font-weight: 500;
}
tbody tr:not(:first-child) {
border-top: 1px solid rgba(0, 0, 0, 0.025);
}
tbody td {
line-height: 1.4;
}
th, td {
padding: 1em;
text-align: left;
vertical-align: top;
}
/* Layout */
header, h1 {
align-items: center;
align-self: center;
color: #444;
display: flex;
flex-direction: column;
}
header h1::before {
content: '';
background: url('../favicon.ico') center no-repeat;
background-size: 2em;
height: 2em;
margin-bottom: 1em;
width: 2em;
}
header p {
color: #555;
margin-top: 1em;
}
main {
margin: 4em 0;
opacity: 0;
/* background: #FFF; */
transition: opacity 1s;
}
main section:not(:first-child) {
margin-top: 4em;
}
footer {
color: #FFF;
font-size: 0.9em;
line-height: 1.5em;
text-align: center;
}
footer a {
color: #FFF;
}
footer img {
height: 1.5em;
}
footer p {
margin: 0;
}
/* Components */
.loading {
align-items: center;
display: flex;
justify-content: center;
margin: 2em;
text-align: center;
}
.loading::before {
animation: spinner 1s infinite linear;
content: '';
border: 2px solid transparent;
border-top-color: #5ac8fa;
border-right-color: #5ac8fa;
border-radius: 1em;
height: 1.5em;
margin-right: 1em;
width: 1.5em;
}
/* 工具面板 */
.tool-panel {
display: none;
z-index: 100;
position: fixed;
left: 0;
bottom: 0;
opacity: 1;
transition: all 0.5s;
animation: ToolPanelShow 0.5s;
}
.tool-panel-bar {
height: 32px;
}
.tool-panel-newtab,
.tool-panel-close {
position: absolute;
top: 0;
height: 32px;
width: 64px;
box-shadow: -2px 0 10px 0 rgba(0, 0, 0, 0.1);
line-height: 32px;
text-align: center;
font-size: 14px;
color: #FFF;
}
.tool-panel-blank {
position: absolute;
top: 0;
left: 0;
height: 32px;
width: 100%;
background-color: #FFF;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.tool-panel-newtab {
right: 72px;
background-color: #2196F3;
}
.tool-panel-close {
right: 8px;
background-color: #F44336;
}
.tool-panel-iframe {
}
.tool-panel-iframe iframe {
height: calc(100vh - 32px);
width: 100vw;
}
/* 链接的图标 */
/*
main section li img {
height: 28px;
position: absolute;
transform: translate(10px, 10px);
}
main section li a:not(.back) {
padding-left: 45px !important;
}
*/
/* 全屏文字 */
.fullscreen-text {
position: fixed;
top: 50%;
left: 50%;
font-size: 5vw;
color: #FFF;
transform: translate(-50%, -50%);
transition: opacity 1s;
}
/* 查找面板 */
.search-panel {
visibility: hidden;
position: fixed;
top: 50%;
left: 50%;
height: 300px;
width: 500px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
transform: translate(-50%, -50%);
}
.search-bar{
text-align: center;
}
.search-bar .search-input {
margin: 20px 5px 0 0;
padding: 0 15px;
width: 60%;
height: 50px;
border: solid 2px #03A9F4;
box-shadow: 0 0 5px rgba(3, 169, 244, 0.1);
font-size: 20px;
transition: border 0.2s;
}
.search-bar .search-input:hover {
border: solid 2px #00BCD4;
}
.search-bar .search-submit,
.search-bar .search-cancel {
width: 75px;
height: 50px;
border: none;
background-color: #03A9F4;
box-shadow: 0 5px 10px -5px rgba(3, 169, 244, 0.4);
font-size: 20px;
color: #FFF;
transition: background 0.2s;
}
.search-bar .search-submit:hover,
.search-bar .search-cancel:hover {
background-color: #00BCD4;
}
.search-bar .search-submit {
margin-right: 5px;
}
.search-result {
margin-top: 10px;
padding: 0 16px;
height: calc(100% - 100px);
overflow-y: scroll;
}
.search-result a {
display: block;
margin-bottom: 10px;
font-size: 20px;
}
#search-result-title {
border-bottom: 1px solid #DDD;
}
#search-result-link {
margin-top: 7px;
}
@media screen and (max-width: 500px) {
.search-panel {
height: 300px;
width: 95%;
}
.search-bar .search-input {
margin: 15px 5px 0 0;
padding: 0 10px;
width: 55%;
height: 40px;
font-size: 16px;
}
.search-bar .search-submit,
.search-bar .search-cancel {
width: 16%;
height: 40px;
font-size: 16px;
}
.search-result {
padding: 0 5%;
height: calc(100% - 80px);
}
.search-result a {
margin-bottom: 8px;
font-size: 16px;
}
}
/* 搜索引擎 */
.search-engine {
width: 100%;
}
.search-engine-bar {
height: 45px;
width: 100%;
background-color: #FFF;
border-radius: 5px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
white-space: nowrap;
}
.search-engine-select {
color: #FFF;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}
#search-engine-input {
padding-left: 15px;
box-sizing: border-box;
height: 100%;
width: calc(100% - 45px);
background-color: transparent;
border: none;
font-size: 14px;
}
.search-engine-submit {
display: inline-block;
position: relative;
top: 7px;
left: 7px;
height: 24px;
width: 24px;
color: #03A9F4;
fill: currentcolor;
user-select: none;
}
.search-engine-select ul {
margin-top: 20px;
width: 100%;
text-align: center;
}
.search-engine-select ul li {
display: inline-block;
margin: 0 5px;
list-style: none;
font-size: 16px;
}
/* radio 样式 */
.search-engine-select ul li input[type="radio"] {
position: absolute;
opacity: 0;
}
.search-engine-select ul li input[type="radio"] + label:before {
content: '';
border-radius: 0px;
background: #FFF;
border: 1px solid #999;
display: inline-block;
width: 1em;
height: 1em;
position: relative;
top: 0;
margin-right: 0.25em;
vertical-align: top;
text-align: center;
transition: all 0.25s ease;
}
.search-engine-select ul li input[type="radio"]:checked + label:before {
background-color: #03A9F4;
box-shadow: inset 0 0 0 2px #FFF;
}
.search-engine-select ul li input[type="radio"]:focus + label:before {
outline: none;
border-color: #00BCD4;
}
.search-engine-select ul li input[type="radio"]:disabled + label:before {
box-shadow: inset 0 0 0 2px #FFF;
border-color: #999;
background: #999;
}
.search-engine-select ul li input[type="radio"] + label:empty:before {
margin-right: 0;
}
/* 悬浮栏 */
.floating-bar {
z-index: 50;
position: fixed;
left: 0;
bottom: 20px;
width: 100%;
/* opacity: 0.9; */
text-align: center;
animation: FloatingBarSlide 1s ease-out 1;
}
.floating-bar-search,
.floating-bar-tool,
.floating-bar-about,
.floating-bar-totop {
display: inline-block;
width: 50px;
height: 32px;
background-color: #4CAF50;
box-shadow: 0 8px 10px -4px rgba(76, 175, 80, 0.5);
text-align: center;
line-height: 32px;
font-size: 14px;
color: #fff;
}
.floating-bar-tool,
.floating-bar-about,
.floating-bar-totop {
margin-left: 5px;
}

View File

@@ -1,114 +0,0 @@
@charset "UTF-8";
.slinky-menu {
overflow: hidden;
transform: translateZ(0);
}
.slinky-menu>ul {
left: 0;
position: relative;
transform: translateZ(0);
}
.slinky-menu ul,
.slinky-menu li {
list-style: none;
margin: 0;
}
.slinky-menu ul {
width: 100%;
}
.slinky-menu a {
align-items: center;
display: flex;
}
.slinky-menu a span {
flex: 1;
line-height: 1.4;
}
.slinky-menu li ul {
display: none;
left: 100%;
position: absolute;
top: 0;
}
.slinky-menu .header {
display: flex;
}
.slinky-menu .header .title {
flex: 1;
line-height: 1.4;
margin: 0;
order: 1;
}
.slinky-theme-default {
width: 100%;
background: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.slinky-theme-default .title {
color: #333;
padding: 1em;
}
.slinky-theme-default li {
line-height: 1;
}
.slinky-theme-default a:not(.back) {
color: #333;
padding: 1em;
}
.slinky-theme-default a:not(.back):hover {
background: rgba(90, 200, 250, 0.25);
}
.slinky-theme-default a:not(.back):active {
background: rgba(90, 200, 250, 0.5);
}
/* 显示链接 */
.slinky-theme-default a:not([href="#"]):not([href^="javascript"])::after {
content: attr(href);
}
.slinky-theme-default .next::after,
.slinky-theme-default .back::before {
background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+ICAgIDxwYXRoIGQ9Ik0xMi4yMTkgMi4yODFMMTAuNzggMy43MiAxOC4wNjIgMTFIMnYyaDE2LjA2M2wtNy4yODIgNy4yODEgMS40MzggMS40MzggOS05IC42ODctLjcxOS0uNjg3LS43MTl6IiAvPjwvc3ZnPg==) center no-repeat;
background-size: 1em;
content: '';
height: 1em;
opacity: 0.25;
transition: 200ms;
width: 1em;
}
.slinky-theme-default .next::after {
margin-left: 1em;
}
.slinky-theme-default .back::before {
padding: 1em;
transform: scaleX(-1);
}
.slinky-theme-default .next:hover::after,
.slinky-theme-default .back:hover::before {
opacity: 0.75;
}
.slinky-theme-default .next:active::after,
.slinky-theme-default .back:active::before {
opacity: 1;
}

View File

@@ -1,228 +0,0 @@
@charset "UTF-8";
body {
padding: 20px 0 50px 0;
background-color: #999;
scroll-behavior: smooth;
}
/* 主要 */
.main {
margin: 0 auto;
width: 90%;
max-width: 450px;
}
.main > div {
margin: 20px 0;
padding: 15px;
box-sizing: border-box;
width: 100%;
border-radius: 5px;
background-color: #FFF;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.main > div header {
margin-bottom: 10px;
text-align: center;
font-size: 20px;
font-weight: bold;
user-select: none;
}
.main > div input:focus {
outline: none;
}
.main > div textarea {
padding: 5px;
box-sizing: border-box;
width: 100%;
border: 1px solid #03A9F4;
box-shadow: 0 0 5px rgba(3, 169, 244, 0.2);
font-size: 14px;
}
.main > div textarea:focus {
outline: none;
}
.tool-button {
display: inline-block;
user-select: none;
padding: 5px 10px;
background-color: #03A9F4;
text-align: center;
font-size: 14px;
color: #FFF;
border-radius: 5px;
box-shadow: 2px 2px 5px rgba(3, 169, 244, 0.4);
transition: background 0.2s;
}
.tool-button:hover {
background-color: #2196F3;
}
/* 索引 */
.tool-nav ul li {
display: inline-block;
list-style: none;
}
.tool-nav ul li a {
display: block;
float: left;
padding: 5px 9px;
border-radius: 5px;
background-color: #4CAF50;
text-decoration: none;
font-size: 14px;
color: #FFF;
transition: background 0.2s;
}
.tool-nav ul li a:hover {
background-color: #8BC34A;
}
.tool-nav-link {
margin: 0 auto;
box-sizing: border-box;
width: 100%;
}
/* Unix 时间戳转换 */
#tool-unixtime > div {
user-select: none;
}
#tool-unixtime > div > span {
display: inline-block;
width: 100px;
text-align: right;
font-size: 14px;
font-weight: bold;
}
#tool-unixtime > p {
font-size: 16px;
font-weight: bold;
}
#tool-unixtime input[type="text"] {
width: 160px;
border: 1px solid #03A9F4;
font-size: 14px;
}
#tool-unixtime label {
font-size: 14px;
}
#tool-unixtime .tool-button {
margin: 5px 5px 2px 0;
}
/* 计算下载用时 */
#tool-downloadtime {
}
#tool-downloadtime-input {
padding: 0 0 10px 0;
border-bottom: 1px solid #EEE;
}
#tool-downloadtime-output {
padding: 10px 0;
border-bottom: 1px solid #EEE;
}
#tool-downloadtime .tool-button {
margin: 10px 5px 10px 0;
}
#tool-downloadtime-help {
padding: 10px 0 0 0;
border-top: 1px solid #EEE;
font-size: 14px;
}
/* 简易计算 */
#tool-calculate textarea {
resize: vertical;
font-size: 16px;
}
#tool-calculate-tofixed {
width: 20px;
font-size: 14px;
}
#tool-calculate .tool-button {
margin: 5px 5px 2px 0;
}
/* 生成批量下载链接 */
#tool-genlink hr {
height: 0;
border: 0.5px solid #EEE;
}
#tool-genlink-link input {
margin-bottom: 10px;
padding: 0 2px;
height: 20px;
width: 80%;
border: 1px solid #03A9F4;
}
#tool-genlink-settings {
user-select: none;
font-size: 14px;
}
#tool-genlink-settings > div {
margin: 5px 0;
}
#tool-genlink-settings input[type="text"] {
width: 25px;
font-size: 14px;
}
#tool-genlink .tool-button {
margin: 10px 5px 10px 0;
}
#tool-genlink textarea {
resize: vertical;
font-size: 14px;
}
/* 新窗口(小窗)中打开 */
#tool-newwindow > div {
margin-bottom: 10px;
}
#tool-newwindow-link input[type="text"] {
padding: 5px;
width: 80%;
}
#tool-newwindow-meta input[type="text"] {
padding: 5px;
width: 100px;
}
/* 运行 JavaScript */
#tool-runjs textarea {
resize: vertical;
font-family: monospace;
font-size: 14px;
}
#tool-runjs .tool-button {
margin: 5px 5px 0 0;
}
/* 返回顶部 */
.to-top {
position: fixed;
right: 20px;
bottom: 20px;
height: 50px;
width: 50px;
border-radius: 50%;
box-shadow: 0px 0px 10px 0 rgba(0, 0, 0, 0.1);
background-color: #FFF;
text-align: center;
line-height: 50px;
font-family: monospace;
font-size: 20px;
color: #2196F3;
user-select: none;
transition: all 0.5s;
}
.to-top:hover {
animation: ToTopAnimation 0.5s ease-in-out;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ff2d55">
<path d="M16.398 4C14.602 4 13 4.898 12 6.3 11 4.899 9.398 4 7.602 4A5.591 5.591 0 0 0 2 9.602C2 14 12 22 12 22s10-8 10-12.398C22 6.5 19.5 4 16.398 4z"/>
</svg>

Before

Width:  |  Height:  |  Size: 241 B

View File

@@ -1,8 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
<rect fill="#6BA73C" width="100" height="10"/>
<rect fill="#ECAE3C" y="18" width="100" height="10"/>
<rect fill="#DB752D" y="36" width="100" height="10"/>
<rect fill="#C43935" y="54" width="100" height="10"/>
<rect fill="#742F81" y="72" width="100" height="10"/>
<rect fill="#3E82CC" y="90" width="100" height="10"/>
</svg>

Before

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,210 +0,0 @@
/* ---- */
/* 变量 */
/* ---- */
// Slinky 插件的设置 //
var SlinkyOption = {
title: true,
speed: 200
};
var ListID = "#list_"; // 列表 ID 前缀
var ListCount = 0;
var ListCountMax = 17; // 列表总数
var FullsSreenText = document.querySelector(".fullscreen-text"); // 全屏文字
// main 中的 A 标签的对象的集合(链接列表)//
var LinkList = document.querySelectorAll("main a");
// 查找面板 //
var SearchMode = 1;
var SearchPanel = document.querySelector(".search-panel"); // 查找面板
var SearchInput = document.querySelector(".search-input"); // 查找输入框
var SearchResultTitle = document.querySelector("#search-result-title"); // 查找结果(标题)
var SearchResultLink = document.querySelector("#search-result-link"); // 查找结果(链接)
var SearchResultItem = "";
// 搜索引擎 //
var SearchEngineBaidu = document.querySelector("#search-engine-baidu"); // 百度
var SearchEngineBing = document.querySelector("#search-engine-bing"); // Bing
var SearchEngineGoogle = document.querySelector("#search-engine-google"); // Google
var SearchEnginebilibili = document.querySelector("#search-engine-bilibili"); // bilibili
// 工具面板 //
var ToolPanel = document.querySelector(".tool-panel");
/* ---- */
/* 函数 */
/* ---- */
// 查找字符 tChar 在 str 中第 num 次出现的位置 //
function findChar(str, tChar, num) {
var charPos = str.indexOf(tChar);
num = num - 1;
if (num > 0) {
for (var i = 0; i < num; i++) {
charPos = str.indexOf(tChar, charPos + 1);
}
}
return charPos;
}
/* 链接列表 */
// 设置 target = "_blank" //
function setTarget() {
for (var i = 0; i < LinkList.length; i++) {
if (LinkList[i].href.endsWith("#") == false) {
LinkList[i].target = "_blank";
/* 自动加图标(暂不使用)
var slashPos = findChar(LinkList[i].href, '/', 3);
getFavicon = "https://www.google.cn/s2/favicons?domain=" + LinkList[i].href.substring(0, slashPos);
var imgTag = "<img src='" + getFavicon + "' />";
LinkList[i].insertAdjacentHTML("beforeBegin", imgTag);
*/
}
}
}
// 显示列表 //
function displayList() {
document.querySelector("main").style.opacity = "1";
FullsSreenText.style.opacity = "0";
setTimeout(function () {
document.querySelector(".fullscreen-text").style.display = "none";
}, 1000);
}
// 加载列表 //
function loadList() {
ListCount = ListCount + 1;
ListID = "#list_" + ListCount;
$(ListID).slinky(SlinkyOption);
FullsSreenText.innerHTML = "已加载 " + ListCount + " 个分类"; // 全屏文字
// 加载完毕 //
if (ListCount == ListCountMax) {
clearInterval(I_LoadList); // 停止定时执行
FullsSreenText.innerHTML = "加载完毕"; // 全屏文字
setTarget(); // 设置 target
displayList(); // 显示列表
}
}
var I_LoadList = setInterval("loadList()", 100); // 加载列表,间隔 100 毫秒
/* 链接查找 */
function searchLink() {
var LinkListCount = LinkList.length; // 循环次数
var SearchWord = SearchInput.value.toLowerCase(); // 查找关键词
if (SearchMode == 1 && SearchWord != "") {
SearchResultTitle.innerHTML = ""; // 清空查找结果(标题)
SearchResultLink.innerHTML = ""; // 清空查找结果(链接)
for (var i = 0; i < LinkListCount; i++) {
// 排除 href 是 # 的元素 //
if (LinkList[i].href.endsWith("#") == false) {
// 匹配关键词 //
if (LinkList[i].innerHTML.toLowerCase().indexOf(SearchWord) != -1) {
// 匹配标题 //
SearchResultItem = LinkList[i].cloneNode(true);
SearchResultTitle.appendChild(SearchResultItem); // 复制元素
} else if (LinkList[i].href.indexOf(SearchWord) != -1) {
// 匹配链接 //
SearchResultItem = LinkList[i].cloneNode(true);
SearchResultLink.appendChild(SearchResultItem); // 复制元素
}
}
}
} else if (SearchMode == 1 && SearchWord == "") {
SearchResultTitle.innerHTML = "";
SearchResultLink.innerHTML = "未输入关键词";
} else if (SearchMode == 2) {
SearchInput.value = ""; // 清空输入框
SearchResultTitle.innerHTML = ""; // 清空查找结果(标题)
SearchResultLink.innerHTML = ""; // 清空查找结果(链接)
SearchPanel.style.visibility = "hidden"; // 隐藏查找面板
} else {
SearchResultTitle.innerHTML = "";
SearchResultLink.innerHTML = "异常";
}
}
/* 搜索引擎 */
// 搜索 //
function searchWeb() {
var GetSearchWord = document.querySelector("#search-engine-input"); // 关键词输入框
var SearchWord = GetSearchWord.value; // 关键词
if (SearchEngineBaidu.checked == true) {
window.open("https://www.baidu.com/s?ie=UTF-8&wd=" + SearchWord);
} else if (SearchEngineBing.checked == true) {
window.open("https://cn.bing.com/search?q=" + SearchWord);
} else if (SearchEngineGoogle.checked == true) {
window.open("https://www.google.com/search?q=" + SearchWord);
} else if (SearchEnginebilibili.checked == true) {
window.open("https://search.bilibili.com/all" + "?keyword=" + SearchWord);
} else {
GetSearchWord.value = "搜索引擎选择有误!"
}
}
// 储存当前搜索引擎 //
function setSearchEngine(Name) {
switch (Name)
{
case "baidu":
localStorage.setItem("SearchEngine", "baidu");
break;
case "bing":
localStorage.setItem("SearchEngine", "bing");
break;
case "google":
localStorage.setItem("SearchEngine", "google");
break;
case "bilibili":
localStorage.setItem("SearchEngine", "bilibili");
break;
default:
break;
}
}
// 设置当前搜索引擎 //
function getSearchEngine() {
var SearchEngine = localStorage.getItem("SearchEngine");
switch (SearchEngine){
case "baidu":
SearchEngineBaidu.checked = true;
break;
case "bing":
SearchEngineBing.checked = true;
break;
case "google":
SearchEngineGoogle.checked = true;
break;
case "bilibili":
SearchEnginebilibili.checked = true;
break;
default:
break;
}
}
getSearchEngine();
/* 工具面板 */
// 显示 //
function showToolPanel() {
ToolPanel.style.display = "block";
}
// 关闭 //
function closeToolPanel() {
ToolPanel.style.bottom = "-110%";
ToolPanel.style.opacity = "0";
setTimeout(function () {
ToolPanel.style.display = "none";
ToolPanel.style.bottom = "0";
ToolPanel.style.opacity = "1";
}, 500);
}

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +0,0 @@
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t){function n(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function s(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}
/*
* Slinky
* Rather sweet menus
* @author Ali Zahid <ali.zahid@live.com>
* @license MIT
*/
var a=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.settings=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},this.options,{},r),this._init(t)}return s(e,[{key:"options",get:function(){return{resize:!0,speed:300,theme:"slinky-theme-default",title:!1}}}]),s(e,[{key:"_init",value:function(e){this.menu=jQuery(e),this.base=this.menu.children().first();var t=this.menu,n=this.settings;t.addClass("slinky-menu").addClass(n.theme),this._transition(n.speed),jQuery("a + ul",t).prev().addClass("next"),jQuery("li > a",t).wrapInner("<span>");var i=jQuery("<li>").addClass("header");jQuery("li > ul",t).prepend(i);var r=jQuery("<a>").prop("href","#").addClass("back");jQuery(".header",t).prepend(r),n.title&&jQuery("li > ul",t).each(function(e,t){var n=jQuery(t).parent().find("a").first().text();if(n){var i=jQuery("<header>").addClass("title").text(n);jQuery("> .header",t).append(i)}}),this._addListeners(),this._jumpToInitial()}},{key:"_addListeners",value:function(){var e=this,t=this.menu,n=this.settings;jQuery("a",t).on("click",function(i){if(e._clicked+n.speed>Date.now())return!1;e._clicked=Date.now();var r=jQuery(i.currentTarget);(0===r.attr("href").indexOf("#")||r.hasClass("next")||r.hasClass("back"))&&i.preventDefault(),r.hasClass("next")?(t.find(".active").removeClass("active"),r.next().show().addClass("active"),e._move(1),n.resize&&e._resize(r.next())):r.hasClass("back")&&(e._move(-1,function(){t.find(".active").removeClass("active"),r.parent().parent().hide().parentsUntil(t,"ul").first().addClass("active")}),n.resize&&e._resize(r.parent().parent().parentsUntil(t,"ul")))})}},{key:"_jumpToInitial",value:function(){var e=this.menu,t=this.settings,n=e.find(".active");n.length>0&&(n.removeClass("active"),this.jump(n,!1)),setTimeout(function(){return e.height(e.outerHeight())},t.speed)}},{key:"_move",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(0!==e){var n=this.settings,i=this.base,r=Math.round(parseInt(i.get(0).style.left))||0;i.css("left","".concat(r-100*e,"%")),"function"==typeof t&&setTimeout(t,n.speed)}}},{key:"_resize",value:function(e){this.menu.height(e.outerHeight())}},{key:"_transition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=this.menu,n=this.base;t.css("transition-duration","".concat(e,"ms")),n.css("transition-duration","".concat(e,"ms"))}},{key:"jump",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e){var n=this.menu,i=this.settings,r=jQuery(e),s=n.find(".active"),a=0;s.length>0&&(a=s.parentsUntil(n,"ul").length),n.find("ul").removeClass("active").hide();var o=r.parentsUntil(n,"ul");o.show(),r.show().addClass("active"),t||this._transition(0),this._move(o.length-a),i.resize&&this._resize(r),t||this._transition(i.speed)}}},{key:"home",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.base,n=this.menu,i=this.settings;e||this._transition(0);var r=n.find(".active"),s=r.parentsUntil(n,"ul");this._move(-s.length,function(){r.removeClass("active").hide(),s.not(t).hide()}),i.resize&&this._resize(t),!1===e&&this._transition(i.speed)}},{key:"destroy",value:function(){var e=this,t=this.base,n=this.menu;jQuery(".header",n).remove(),jQuery("a",n).removeClass("next").off("click"),n.css({height:"","transition-duration":""}),t.css({left:"","transition-duration":""}),jQuery("li > a > span",n).contents().unwrap(),n.find(".active").removeClass("active"),n.attr("class").split(" ").forEach(function(e){0===e.indexOf("slinky")&&n.removeClass(e)});["settings","menu","base"].forEach(function(t){return delete e[t]})}}]),e}();jQuery.fn.slinky=function(e){return new a(this,e)}},function(e,t,n){}]);

View File

@@ -1,325 +0,0 @@
/* --------------- */
/* Unix 时间戳转换 */
/* --------------- */
// 函数:将传入的时间转换为时间戳 //
function toolUnixTimeToUnix(GetTime, isMillisecond) {
var Time = new Date(); // 创建 Date 对象
// 根据 GetTime 设置时间 //
Time.setFullYear(GetTime.substring(0, 4)); // GetTime 的子串:年
Time.setMonth(GetTime.substring(5, 7) - 1); // GetTime 的子串:月
Time.setDate(GetTime.substring(8, 10)); // GetTime 的子串:日
Time.setHours(GetTime.substring(11, 13)); // GetTime 的子串:时
Time.setMinutes(GetTime.substring(14, 16)); // GetTime 的子串:分
Time.setSeconds(GetTime.substring(17, 19)); // GetTime 的子串:秒
// 调试 //
// console.log("时间:" + Time);
// 根据 isMillisecond 确认输出的单位
if (isMillisecond == false) {
// 模式:秒 //
var TextLength = Time.getTime().toString().length; // 获取字符串长度
return Time.getTime().toString().substring(0, TextLength - 3); // 返回时间戳
} else if (isMillisecond == true) {
// 模式:毫秒 //
var TextLength = Time.getTime().toString().length; // 获取字符串长度
return Time.getTime().toString().substring(0, TextLength - 3) + "000"; // 返回时间戳
} else {
return "模式有误!";
}
}
// 函数:将传入的时间戳转换为时间 //
function toolUnixTimeToTime(GetUnix, isMillisecond) {
var Time = new Date(); // 创建 Date 对象
// 根据 isMillisecond 确认输入的单位
if (isMillisecond == false) {
// 模式:秒 //
GetUnix = GetUnix + "000"; // 补零变为毫秒
Time.setTime(GetUnix); // 根据 GetUnix 设置时间
} else if (isMillisecond == true) {
// 模式:毫秒 //
Time.setTime(GetUnix); // 根据 GetUnix 设置时间
} else {
Time.setTime("0"); // 把时间设置为 0
}
var TimeYear = Time.getFullYear(); // 年
var TimeMonth = Time.getMonth() + 1; // 月
// 补零 //
if (TimeMonth.toString().length == 1) {
TimeMonth = "0" + TimeMonth;
}
var TimeDate = Time.getDate(); // 日
// 补零 //
if (TimeDate.toString().length == 1) {
TimeDate = "0" + TimeDate;
}
var TimeHour = Time.getHours(); // 时
// 补零 //
if (TimeHour.toString().length == 1) {
TimeHour = "0" + TimeHour;
}
var TimeMinute = Time.getMinutes(); // 分
// 补零 //
if (TimeMinute.toString().length == 1) {
TimeMinute = "0" + TimeMinute;
}
var TimeSecond = Time.getSeconds(); // 秒
// 补零 //
if (TimeSecond.toString().length == 1) {
TimeSecond = "0" + TimeSecond;
}
// 返回:年-月-日 时:分:秒 //
return TimeYear + "-" + TimeMonth + "-" + TimeDate + " " + TimeHour + ":" + TimeMinute + ":" + TimeSecond;
}
// 按钮:当前 //
function toolUnixTimeNow() {
var GetInputA = document.getElementById("tool-unixtime-input-a").getElementsByTagName("input")[0]; // 输入框 A
var GetInputB = document.getElementById("tool-unixtime-input-b").getElementsByTagName("input")[0]; // 输入框 B
var GetSettingAA = document.getElementById("unixtime-setting-aa").checked; // A 模式:秒
var GetSettingAB = document.getElementById("unixtime-setting-ab").checked; // A 模式:毫秒
var GetSettingBA = document.getElementById("unixtime-setting-ba").checked; // B 模式:秒
var GetSettingBB = document.getElementById("unixtime-setting-bb").checked; // B 模式:毫秒
// 调用函数,获取时间 //
if (GetSettingAA == true) {
var Time = new Date(); // 创建 Date 对象
var TextLength = Time.getTime().toString().length; // 获取字符串长度
GetInputA.value = Time.getTime().toString().substring(0, TextLength - 3); // 时间戳(秒)
} else if (GetSettingAB == true) {
GetInputA.value = new Date().getTime(); // 时间戳(毫秒)
}
GetInputB.value = toolUnixTimeToTime(new Date().getTime(), true); // 时间
}
// 按钮:转换 //
function toolUnixTimeSubmit() {
var GetInputA = document.getElementById("tool-unixtime-input-a").getElementsByTagName("input")[0]; // 输入框 A
var GetInputB = document.getElementById("tool-unixtime-input-b").getElementsByTagName("input")[0]; // 输入框 B
var GetOutputA = document.getElementById("tool-unixtime-output-a").getElementsByTagName("input")[0]; // 输出框 A
var GetOutputB = document.getElementById("tool-unixtime-output-b").getElementsByTagName("input")[0]; // 输出框 B
var GetSettingAA = document.getElementById("unixtime-setting-aa").checked; // A 模式:秒
var GetSettingAB = document.getElementById("unixtime-setting-ab").checked; // A 模式:毫秒
var GetSettingBA = document.getElementById("unixtime-setting-ba").checked; // B 模式:秒
var GetSettingBB = document.getElementById("unixtime-setting-bb").checked; // B 模式:毫秒
// 调用函数,转换时间 //
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.querySelector("#tool-unixtime-input-a input").value = ''; // 清空输入框 A
document.querySelector("#tool-unixtime-input-b input").value = ''; // 清空输入框 B
document.querySelector("#tool-unixtime-output-a input").value = ''; // 清空输出框 A
document.querySelector("#tool-unixtime-output-b input").value = ''; // 清空输出框 B
}
/* ---- */
/* 计算 */
/* ---- */
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"); // 替换圆周率Math.PI
GetCal = GetCal.replace(/幂/g, "Math.pow"); // 替换乘方运算Math.pow
GetCal = GetCal.replace(/平方根/g, "Math.sqrt"); // 替换乘方运算Math.pow
// 运行 //
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; // 自动补零的个数
// 自动补 0 //
for (let i = 1; i <= ZeroMax; i++) {
Num = "0" + Num;
}
}
}
// 替换变量;替换变量;判断是否开启倒序;拼接结果;拼接结果 //
function CheckReverse() {
LinkReplace = BaseLink.replace(VarText, Num); // 替换链接中的变量为当前值VarText 替换为 Num
if (GetReverse == false) {
// console.log("非倒序");
LinkResult = LinkResult + LinkReplace + "\n"; // 拼接结果
} else if (GetReverse == true) {
// console.log("倒序");
LinkResult = LinkReplace + "\n" + LinkResult; // 拼接结果
}
}
// 运行 //
if (GetSettingType[0].checked == true) {
// 等差数列 //
// console.log("等差数列");
var GetFirst = parseInt(GetSettingA[1].value); // 首项
var GetLength = parseInt(GetSettingA[2].value); // 项数
var GetDiff = parseInt(GetSettingA[3].value); // 公差
var GetZero = GetSettingA[4].checked; // 补零
var GetReverse = GetSettingA[5].checked; // 倒序
// 判断是否开启补零 //
if (GetZero == true) {
// 等差数列 补零 //
// console.log("等差数列 补零");
var Num; // 当前项的值
var NumLength; // 当前项的值的位数
var NumLast = GetFirst + (GetLength - 1) * GetDiff; // 根据等差数列通项公式计算末项的值
var NumLastLength = NumLast.toString().length; // 末项的值的位数
// console.log("末项的值:" + NumLast);
for (var i = 1; i <= GetLength; i++) {
Num = GetFirst + (i - 1) * GetDiff; // 根据等差数列通项公式计算当前项的值
NumLength = Num.toString().length; // 当前项的值的位数
AddZero(); // 若位数不足,自动补零
CheckReverse(); // 替换变量;判断是否开启倒序;拼接结果
}
} else if (GetZero == false) {
// 等差数列 不补零 //
// console.log("等差数列 不补零");
var Num; // 当前项的值
for (var i = 1; i <= GetLength; i++) {
Num = GetFirst + (i - 1) * GetDiff; // 根据等差数列通项公式计算当前项的值
CheckReverse(); // 替换变量;判断是否开启倒序;拼接结果
}
}
} else if (GetSettingType[1].checked == true) {
// 等比数列 //
var GetFirst = parseInt(GetSettingB[1].value); // 首项
var GetLength = parseInt(GetSettingB[2].value); // 项数
var GetDiff = parseInt(GetSettingB[3].value); // 公比
var GetZero = GetSettingB[4].checked; // 补零
var GetReverse = GetSettingB[5].checked; // 倒序
// 判断是否开启补零 //
if (GetZero == true) {
// 等比数列 补零 //
// console.log("等比数列 补零");
var Num; // 当前项的值
var NumLength; // 当前项的值的位数
var NumLast = GetFirst * Math.pow(GetDiff, (GetLength - 1)); // 根据等比数列通项公式计算末项的值
var NumLastLength = NumLast.toString().length; // 末项的值的位数
// console.log("末项的值:" + NumLast);
for (var i = 1; i <= GetLength; i++) {
Num = GetFirst * Math.pow(GetDiff, (i - 1)); // 根据等比数列通项公式计算当前项的值
NumLength = Num.toString().length; // 当前项的值的位数
AddZero(); // 若位数不足,自动补零
CheckReverse(); // 替换变量;判断是否开启倒序;拼接结果
}
} else if (GetZero == false) {
// 等比数列 不补零 //
// console.log("等比数列 不补零");
var Num; // 当前项的值
for (var i = 1; i <= GetLength; i++) {
Num = GetFirst * Math.pow(GetDiff, (i - 1)); // 根据等比数列通项公式计算当前项的值
CheckReverse(); // 替换变量;判断是否开启倒序;拼接结果
}
}
} else if (GetSettingType[2].checked == true) {
// 字母变化 //
var GetFirst = GetSettingC[1].value.charCodeAt(0); // 从(获取对应字母的 Unicode 编码)
var GetLast = GetSettingC[2].value.charCodeAt(0); // 到(获取对应字母的 Unicode 编码)
var GetReverse = GetSettingC[3].checked; // 倒序
// console.log("从:" + GetFirst);
// console.log("到:" + GetLast);
// console.log("倒序:" + GetReverse);
if (GetFirst >= 65 && GetFirst <= 122 && GetLast >= 65 && GetLast <= 122) {
if (GetFirst < GetLast) {
for (var i = GetFirst; i <= GetLast; i++) {
if (i >= 91 && i <= 96) {
continue; // 若为 [ \ ] ^ _ ` 则跳出循环
}
Num = String.fromCharCode(i); // 获取对应 Unicode 编码的字母
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 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 = ""; // 高度
}
/* --------------- */
/* 运行 JavaScript */
/* --------------- */
function toolRunJSSubmit() {
var GetCode = document.querySelector("#tool-runjs-input"); // 代码输入框
eval(GetCode.value); // 运行
}
function toolRunJSClear() {
var GetCode = document.querySelector("#tool-runjs-input"); // 代码输入框
GetCode.value = ''; // 清空
}

View File

@@ -1,186 +0,0 @@
<!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-newwindow">新窗口(小窗)中打开</a></li>
<li><a href="#tool-runjs">运行 JavaScript</a></li>
</ul>
</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" onclick="toolUnixTimeNow()">当前</div>
<div class="tool-button" onclick="toolUnixTimeSubmit()">转换</div>
<div class="tool-button" onclick="toolUnixTimeClear()">重置</div>
</div>
<!-- 计算下载用时 -->
<div id="tool-downloadtime">
<header>计算下载用时(未完成)</header>
<!-- 输入 -->
<div id="tool-downloadtime-input">
<b>文件大小:</b><input type="text" /><br />
<b>下载速度:</b><input type="text" />
</div>
<!-- 结果 -->
<div id="tool-downloadtime-output">
<b>大约用时:</b><span>待计算</span>
</div>
<!-- 按钮 -->
<div class="tool-button" onclick="toolDownloadTimeSubmit()">计算</div>
<div class="tool-button" onclick="toolDownloadTimeClear()">重置</div>
<!-- 帮助 -->
<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>
<div class="tool-button" onclick="toolCalculateSubmit()">计算</div>
<div class="tool-button" onclick="toolCalculateClear()">清空</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">
<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" /><br />
<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>
</div>
<hr />
<div id="tool-genlink-settings-b">
<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" /><br />
<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>
</div>
<hr />
<div id="tool-genlink-settings-c">
<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" /><br />
<input type="checkbox" name="genlink-settings-c-reverse" id="genlink-settings-c-reverse" />
<label for="genlink-settings-c-reverse">倒序</label>
</div>
</div>
<hr />
<div class="tool-button" onclick="toolGenLinkSubmit()">生成</div>
<div class="tool-button" onclick="toolGenLinkClear()">清空</div>
<textarea id="tool-genlink-result" rows="8" placeholder="结果"></textarea>
</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>
<div class="tool-button" onclick="toolNewWindowSubmit()">打开</div>
<div class="tool-button" onclick="toolNewWindowClear()">清空</div>
</div>
<!-- 运行 JavaScript -->
<div id="tool-runjs">
<header>运行 JavaScript</header>
<textarea id="tool-runjs-input" rows="6" placeholder="请输入 JavaScript 代码"></textarea>
<div class="tool-button" onclick="toolRunJSSubmit()">运行</div>
<div class="tool-button" onclick="toolRunJSClear()">清空</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.js"></script>
</body>
</html>