From d27973f97c3e16a930e027adf8f1684a442ae35e Mon Sep 17 00:00:00 2001 From: PJ568 Date: Mon, 16 Oct 2023 17:53:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 52 +++++++ assets/favicon.svg | 291 +++++++++++++++++++++++++++++++++++++ css/hack/LICENSE | 21 +++ css/hack/dist/hack.css | 1 + css/hack/dist/standard.css | 1 + css/loading.css | 31 ++++ css/loading.svg | 14 ++ css/main.css | 4 + css/translate.css | 12 ++ footer.html | 3 + index.html | 61 ++++++++ js/giscus.js | 56 +++++++ js/include.js | 26 ++++ js/loading.js | 43 ++++++ 14 files changed, 616 insertions(+) create mode 100644 404.html create mode 100644 assets/favicon.svg create mode 100644 css/hack/LICENSE create mode 100644 css/hack/dist/hack.css create mode 100644 css/hack/dist/standard.css create mode 100644 css/loading.css create mode 100644 css/loading.svg create mode 100644 css/main.css create mode 100644 css/translate.css create mode 100644 footer.html create mode 100644 index.html create mode 100644 js/giscus.js create mode 100644 js/include.js create mode 100644 js/loading.js diff --git a/404.html b/404.html new file mode 100644 index 0000000..f18acce --- /dev/null +++ b/404.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + 404 + + + + + + + +
+
+ 正在加载 +
+
+
+ + +

Hamud language

+ +

404

+

未找到相应信息,或许您应该尝试返回主页。

+ +
+ + +
+ +

反馈

+ +
+
+
+ + + +
+
+ +
+ + \ No newline at end of file diff --git a/assets/favicon.svg b/assets/favicon.svg new file mode 100644 index 0000000..271b68a --- /dev/null +++ b/assets/favicon.svg @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PJ568 + + + + + PJ568 + + + + + PJ568 + + + + + + + + + + + + + + + + + + + + + + diff --git a/css/hack/LICENSE b/css/hack/LICENSE new file mode 100644 index 0000000..b82393b --- /dev/null +++ b/css/hack/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 EGOIST 0x142857@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/css/hack/dist/hack.css b/css/hack/dist/hack.css new file mode 100644 index 0000000..2ba3d3f --- /dev/null +++ b/css/hack/dist/hack.css @@ -0,0 +1 @@ +html{font-size:12px}*{box-sizing:border-box;text-rendering:geometricPrecision}body{font-size:1rem;line-height:1.5rem;margin:0;font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;word-wrap:break-word}h1,h2,h3,h4,h5,h6{line-height:1.3em}fieldset{border:none;padding:0;margin:0}pre{padding:2rem;margin:1.75rem 0;background-color:#fff;border:1px solid #ccc;overflow:auto}code[class*=language-],pre code,pre[class*=language-]{font-weight:100;text-shadow:none;margin:1.75rem 0}a{cursor:pointer;color:#ff2e88;text-decoration:none;border-bottom:1px solid #ff2e88}a:hover{background-color:#ff2e88;color:#fff}.grid{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grid.\-top{-ms-flex-align:start;align-items:flex-start}.grid.\-middle{-ms-flex-align:center;align-items:center}.grid.\-bottom{-ms-flex-align:end;align-items:flex-end}.grid.\-stretch{-ms-flex-align:stretch;align-items:stretch}.grid.\-baseline{-ms-flex-align:baseline;align-items:baseline}.grid.\-left{-ms-flex-pack:start;justify-content:flex-start}.grid.\-center{-ms-flex-pack:center;justify-content:center}.grid.\-right{-ms-flex-pack:end;justify-content:flex-end}.grid.\-between{-ms-flex-pack:justify;justify-content:space-between}.grid.\-around{-ms-flex-pack:distribute;justify-content:space-around}.cell{-ms-flex:1;flex:1;box-sizing:border-box}@media screen and (min-width:768px){.cell.\-1of12{-ms-flex:0 0 8.33333%;flex:0 0 8.33333%}.cell.\-2of12{-ms-flex:0 0 16.66667%;flex:0 0 16.66667%}.cell.\-3of12{-ms-flex:0 0 25%;flex:0 0 25%}.cell.\-4of12{-ms-flex:0 0 33.33333%;flex:0 0 33.33333%}.cell.\-5of12{-ms-flex:0 0 41.66667%;flex:0 0 41.66667%}.cell.\-6of12{-ms-flex:0 0 50%;flex:0 0 50%}.cell.\-7of12{-ms-flex:0 0 58.33333%;flex:0 0 58.33333%}.cell.\-8of12{-ms-flex:0 0 66.66667%;flex:0 0 66.66667%}.cell.\-9of12{-ms-flex:0 0 75%;flex:0 0 75%}.cell.\-10of12{-ms-flex:0 0 83.33333%;flex:0 0 83.33333%}.cell.\-11of12{-ms-flex:0 0 91.66667%;flex:0 0 91.66667%}}@media screen and (max-width:768px){.grid{-ms-flex-direction:column;flex-direction:column}.cell{-ms-flex:0 0 auto;flex:0 0 auto}}.hack,.hack blockquote,.hack code,.hack em,.hack h1,.hack h2,.hack h3,.hack h4,.hack h5,.hack h6,.hack strong{font-size:1rem;font-style:normal;font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif}.hack blockquote,.hack code,.hack em,.hack strong{line-height:20px}.hack blockquote,.hack code,.hack footer,.hack h1,.hack h2,.hack h3,.hack h4,.hack h5,.hack h6,.hack header,.hack li,.hack ol,.hack p,.hack section,.hack ul{float:none;margin:0;padding:0}.hack blockquote,.hack h1,.hack ol,.hack p,.hack ul{margin-top:20px;margin-bottom:20px}.hack h1{position:relative;display:inline-block;display:table-cell;padding:20px 0 30px;margin:0;overflow:hidden}.hack h1:after{content:"====================================================================================================";position:absolute;bottom:10px;left:0}.hack h1+*{margin-top:0}.hack h2,.hack h3,.hack h4,.hack h5,.hack h6{position:relative;margin-bottom:1.75rem}.hack h2:before,.hack h3:before,.hack h4:before,.hack h5:before,.hack h6:before{display:inline}.hack h2:before{content:"## "}.hack h3:before{content:"### "}.hack h4:before{content:"#### "}.hack h5:before{content:"##### "}.hack h6:before{content:"###### "}.hack li{position:relative;display:block;padding-left:20px}.hack li:after{position:absolute;top:0;left:0}.hack ul>li:after{content:"-"}.hack ol{counter-reset:a}.hack ol>li:after{content:counter(a) ".";counter-increment:a}.hack ol li:nth-child(n+10):after{left:-7px}.hack blockquote{position:relative;padding-left:17px;padding-left:2ch;overflow:hidden}.hack blockquote:after{content:">\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>";white-space:pre;position:absolute;top:0;left:0;line-height:20px}.hack em:after,.hack em:before{content:"*";display:inline}.hack pre code:after,.hack pre code:before{content:""}.hack code{font-weight:700}.hack code:after,.hack code:before{content:"`";display:inline}.hack hr{position:relative;height:20px;overflow:hidden;border:0;margin:20px 0}.hack hr:after{content:"----------------------------------------------------------------------------------------------------";position:absolute;top:0;left:0;line-height:20px;width:100%;word-wrap:break-word}@-moz-document url-prefix(){.hack h1{display:block}}.hack-ones ol>li:after{content:"1."}p{margin:0 0 1.75rem}.container{max-width:70rem}.container,.container-fluid{margin:0 auto;padding:0 1rem}.inner{padding:1rem}.inner2x{padding:2rem}.pull-left{float:left}.pull-right{float:right}.progress-bar{height:8px;opacity:.8;background-color:#ccc;margin-top:12px}.progress-bar.progress-bar-show-percent{margin-top:38px}.progress-bar-filled{background-color:gray;height:100%;transition:width .3s ease;position:relative;width:0}.progress-bar-filled:before{content:"";border:6px solid transparent;border-top-color:gray;position:absolute;top:-12px;right:-6px}.progress-bar-filled:after{color:gray;content:attr(data-filled);display:block;font-size:12px;white-space:nowrap;position:absolute;border:6px solid transparent;top:-38px;right:0;-ms-transform:translateX(50%);transform:translateX(50%)}table{width:100%;border-collapse:collapse;margin:1.75rem 0;color:#778087}table td,table th{vertical-align:top;border:1px solid #ccc;line-height:15px;padding:10px}table thead th{font-size:10px}table tbody td:first-child{font-weight:700;color:#333}.form{width:30rem}.form-group{margin-bottom:1.75rem;overflow:auto}.form-group label{border-bottom:2px solid #ccc;color:#333;width:10rem;display:inline-block;height:38px;line-height:38px;padding:0;float:left;position:relative}.form-group.form-success label{color:#4caf50!important;border-color:#4caf50!important}.form-group.form-warning label{color:#ff9800!important;border-color:#ff9800!important}.form-group.form-error label{color:#f44336!important;border-color:#f44336!important}.form-control{outline:0;border:none;border-bottom:2px solid #ccc;padding:.5rem 0;width:20rem;height:38px;background-color:transparent}.form-control:focus{border-color:#555}.form-group.form-textarea label:after{position:absolute;content:"";width:2px;background-color:#fff;right:-2px;top:0;bottom:0}textarea.form-control{height:auto;resize:none;padding:1rem 0;border-bottom:2px solid #ccc;border-left:2px solid #ccc;padding:.5rem}select.form-control{border-radius:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none}.help-block{color:#999;margin-top:.5rem}.form-actions{margin-bottom:1.75rem}.btn{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;outline:0;padding:.65rem 2rem;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;z-index:1}.btn:active{box-shadow:inset 0 1px 3px rgba(0,0,0,.12)}.btn.btn-ghost{border-color:#757575;color:#757575;background-color:transparent}.btn.btn-ghost:focus,.btn.btn-ghost:hover{border-color:#424242;color:#424242;z-index:2}.btn.btn-ghost:hover{background-color:transparent}.btn-block{width:100%;display:-ms-flexbox;display:flex}.btn-default{color:#fff;background-color:#e0e0e0;border:1px solid #e0e0e0;color:#333}.btn-default:focus:not(.btn-ghost),.btn-default:hover{background-color:#dcdcdc;border-color:#dcdcdc}.btn-success{color:#fff;background-color:#4caf50;border:1px solid #4caf50}.btn-success:focus:not(.btn-ghost),.btn-success:hover{background-color:#43a047;border-color:#43a047}.btn-success.btn-ghost{border-color:#4caf50;color:#4caf50}.btn-success.btn-ghost:focus,.btn-success.btn-ghost:hover{border-color:#388e3c;color:#388e3c;z-index:2}.btn-error{color:#fff;background-color:#f44336;border:1px solid #f44336}.btn-error:focus:not(.btn-ghost),.btn-error:hover{background-color:#e53935;border-color:#e53935}.btn-error.btn-ghost{border-color:#f44336;color:#f44336}.btn-error.btn-ghost:focus,.btn-error.btn-ghost:hover{border-color:#d32f2f;color:#d32f2f;z-index:2}.btn-warning{color:#fff;background-color:#ff9800;border:1px solid #ff9800}.btn-warning:focus:not(.btn-ghost),.btn-warning:hover{background-color:#fb8c00;border-color:#fb8c00}.btn-warning.btn-ghost{border-color:#ff9800;color:#ff9800}.btn-warning.btn-ghost:focus,.btn-warning.btn-ghost:hover{border-color:#f57c00;color:#f57c00;z-index:2}.btn-info{color:#fff;background-color:#00bcd4;border:1px solid #00bcd4}.btn-info:focus:not(.btn-ghost),.btn-info:hover{background-color:#00acc1;border-color:#00acc1}.btn-info.btn-ghost{border-color:#00bcd4;color:#00bcd4}.btn-info.btn-ghost:focus,.btn-info.btn-ghost:hover{border-color:#0097a7;color:#0097a7;z-index:2}.btn-primary{color:#fff;background-color:#2196f3;border:1px solid #2196f3}.btn-primary:focus:not(.btn-ghost),.btn-primary:hover{background-color:#1e88e5;border-color:#1e88e5}.btn-primary.btn-ghost{border-color:#2196f3;color:#2196f3}.btn-primary.btn-ghost:focus,.btn-primary.btn-ghost:hover{border-color:#1976d2;color:#1976d2;z-index:2}.btn-group{overflow:auto}.btn-group .btn{float:left}.btn-group .btn-ghost:not(:first-child){margin-left:-1px}.card{border:1px solid #ccc}.card .card-header{color:#333;text-align:center;background-color:#ddd;padding:.5rem 0}.alert{color:#ccc;padding:1rem;border:1px solid #ccc;margin-bottom:1.75rem}.alert-success{color:#4caf50;border-color:#4caf50}.alert-error{color:#f44336;border-color:#f44336}.alert-info{color:#00bcd4;border-color:#00bcd4}.alert-warning{color:#ff9800;border-color:#ff9800}.media:not(:last-child){margin-bottom:1.25rem}.media-left{padding-right:1rem}.media-left,.media-right{display:table-cell;vertical-align:top}.media-right{padding-left:1rem}.media-body{display:table-cell;vertical-align:top}.media-heading{font-size:1.16667rem;font-weight:700}.media-content{margin-top:.3rem}.avatarholder,.placeholder{background-color:#f0f0f0;text-align:center;color:#b9b9b9;font-size:1rem;border:1px solid #f0f0f0}.avatarholder{width:48px;height:48px;line-height:46px;font-size:2rem;background-size:cover;background-position:50%;background-repeat:no-repeat}.avatarholder.rounded{border-radius:33px}.loading{display:inline-block;content:" ";height:20px;width:20px;margin:0 .5rem;animation:a .6s infinite linear;border:2px solid #e91e63;border-right-color:transparent;border-radius:50%}.btn .loading{margin-bottom:0;width:14px;height:14px}.btn div.loading{float:left}.alert .loading{margin-bottom:-5px}@keyframes a{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.menu{width:100%}.menu .menu-item{display:block;color:#616161;border-color:#616161}.menu .menu-item.active,.menu .menu-item:hover{color:#000;border-color:#000;background-color:transparent}@media screen and (max-width:768px){.form-group label{display:block;border-bottom:none;width:100%}.form-group.form-textarea label:after{display:none}.form-control{width:100%}textarea.form-control{border-left:none;padding:.5rem 0}pre::-webkit-scrollbar{height:3px}}@media screen and (max-width:480px){.form{width:100%}} diff --git a/css/hack/dist/standard.css b/css/hack/dist/standard.css new file mode 100644 index 0000000..6d8ac70 --- /dev/null +++ b/css/hack/dist/standard.css @@ -0,0 +1 @@ +html{font-size:14px}.standard{font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica,helvetica neue,Ubuntu,segoe ui,arial,sans-serif}.standard h1{font-size:2em;font-weight:700;margin:.67em 0}.standard h2{font-size:1.5em;font-weight:700;margin:.83em 0}.standard h3{font-size:1.17em;font-weight:700}.standard h3,.standard p{margin:1.75rem 0}.standard ol,.standard ul{display:block;list-style-type:disc;padding-left:20px;margin:1.75rem 0}.standard ol ul,.standard ul ul{margin:.75rem 0;list-style-type:square}.standard ol{list-style-type:decimal}.standard li{display:list-item;padding-left:0}.standard blockquote{margin:1.75rem 0;padding-left:10px;border-left:5px solid #f0f0f0}.standard pre{margin:1.75rem 0;white-space:pre}.standard hr{border:0;height:1px;display:block;background-color:#e2e2e2;margin:1.75rem 0} diff --git a/css/loading.css b/css/loading.css new file mode 100644 index 0000000..cd3d959 --- /dev/null +++ b/css/loading.css @@ -0,0 +1,31 @@ +#loading { + position: fixed; + background-color: #212121; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + z-index: 1000000 +} + +#Calc-loading_bg{ + background-color: rgba(0,0,0,0.7); +} + +.Calc-loader { + line-height: 50px; + text-align: center; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + font-family: helvetica, arial, sans-serif; + text-transform: uppercase; + font-weight: 900; + color: #0277BD; + letter-spacing: 0.2em; +} + +@media screen and (max-width: 980px){.Clac-loader{width:80%}} +@media screen and (min-width: 980px){.Clac-loader{width:25rem}} \ No newline at end of file diff --git a/css/loading.svg b/css/loading.svg new file mode 100644 index 0000000..c491478 --- /dev/null +++ b/css/loading.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..920ac97 --- /dev/null +++ b/css/main.css @@ -0,0 +1,4 @@ +html { + color: #DDD; + background-color: #111; +} \ No newline at end of file diff --git a/css/translate.css b/css/translate.css new file mode 100644 index 0000000..bc32bd2 --- /dev/null +++ b/css/translate.css @@ -0,0 +1,12 @@ +#translate>.translateSelectLanguage { + cursor:pointer; + position:absolute; + padding:0.3rem; + padding-left:0.5rem; + padding-right:0.5rem; + color: #DDD; + background-color: #795548; + border:2px solid #8D6E63; +} +@media screen and (max-width: 980px){#translate>.translateSelectLanguage {left:1rem;top:1rem;font-size:.8rem;width:6rem}} +@media screen and (min-width: 980px){#translate>.translateSelectLanguage {left:2rem;top:2rem;font-size:1rem}} \ No newline at end of file diff --git a/footer.html b/footer.html new file mode 100644 index 0000000..61e2cc7 --- /dev/null +++ b/footer.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..07c4885 --- /dev/null +++ b/index.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + 568_Calc + + + + + + + +
+
+ 正在加载 +
+
+
+ + +

Hamud language

+ +

568_Calc

+

568_Calc 是一个简单的多平台支持的计算器。

+ + + +

贡献者

+

感谢所有提供贡献的人!

+ 贡献者的头像图片 + +

讨论区

+

请留下您的宝贵建议。

+
+
+
项目将持续推进,期待您的贡献
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/js/giscus.js b/js/giscus.js new file mode 100644 index 0000000..8e66a88 --- /dev/null +++ b/js/giscus.js @@ -0,0 +1,56 @@ +// 获取用户使用的语种。 +var lang = translate.language.getCurrent(); +var giscus_lang = "zh-CN"; +switch (lang) { + case "chinese_traditional": + giscus_lang = "zh-TW"; + break; + case "english": + giscus_lang = "en"; + break; + case "spanish": + giscus_lang = "es"; + break; + case "japanese": + giscus_lang = "ja"; + break; + case "korean": + giscus_lang = "ko"; + break; + case "french": + giscus_lang = "fr"; + break; + case "arabic": + giscus_lang = "ar"; + break; + default: + giscus_lang = "zh-CN"; + break; +} + +var giscus = function () { + const script = document.createElement("script"); + script.type = "text/javascript"; + script.src = "https://giscus.app/client.js"; + + + script.setAttribute("data-repo", "PJ-568/568_Calc"); + script.setAttribute("data-repo-id", "R_kgDOKgTh_A"); + script.setAttribute("data-category", "Announcements"); + script.setAttribute("data-category-id", "DIC_kwDOKgTh_M4CaKUO"); + + script.setAttribute("data-mapping", "title"); + script.setAttribute("data-strict", "1"); + script.setAttribute("data-reactions-enabled", "1"); + script.setAttribute("data-emit-metadata", "0"); + script.setAttribute("data-input-position", "top"); + script.setAttribute("data-theme", "transparent_dark"); + script.setAttribute("data-lang", giscus_lang); + script.setAttribute("data-loading", "lazy"); + + script.crossOrigin = "anonymous"; + script.async = true; + document.getElementById("giscus-container").appendChild(script); +}; + +window.addEventListener('load', giscus); \ No newline at end of file diff --git a/js/include.js b/js/include.js new file mode 100644 index 0000000..7bc7f36 --- /dev/null +++ b/js/include.js @@ -0,0 +1,26 @@ +function includeHTML() { + var elements = document.getElementsByTagName("include"); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var file = element.getAttribute("src"); + if (file) { + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() { + if (this.readyState === 4 && this.status === 200) { + element.innerHTML = this.responseText; + // 执行加载的JavaScript代码 + var scripts = element.getElementsByTagName("script"); + for (var j = 0; j < scripts.length; j++) { + var script = document.createElement("script"); + script.innerHTML = scripts[j].innerHTML; + document.body.appendChild(script); + } + } + }; + xhttp.open("GET", file, true); + xhttp.send(); + } + } +} + +document.addEventListener("DOMContentLoaded", includeHTML); \ No newline at end of file diff --git a/js/loading.js b/js/loading.js new file mode 100644 index 0000000..aa38a08 --- /dev/null +++ b/js/loading.js @@ -0,0 +1,43 @@ +// const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)) + +document.onreadystatechange=function () { + if (document.readyState=="complete"){ + loadingFade(); + } +} + +function startLoading() { + const position = document.getElementById('loading'); + var loadingBackground=document.getElementById('Calc-loading_bg'); + position.style.display = 'block'; + loadingBackground.style.opacity=1; + setTimeout(() => loadingFade(), 30000) +} + +function loadingFade() { + var opacity=1; + const position = document.getElementById('loading'); + var loadingBackground=document.getElementById('Calc-loading_bg'); + var time=setInterval(function () { + if (opacity<=0){ + clearInterval(time); + position.style.display = 'none'; + try{ + translate.listener.start(); + translate.language.setLocal('chinese_simplified'); + translate.setAutoDiscriminateLocalLanguage(); + translate.language.setUrlParamControl(); + translate.ignore.class.push('notTranslate'); + } + catch(e){console.log(e);} + translate.setUseVersion2(); + translate.nomenclature.append('chinese_simplified','english',` + 568_Calc=568_Calc + `); + translate.execute(); + } + + loadingBackground.style.opacity=opacity; + opacity-=0.4; + },100); +} \ No newline at end of file