From 61c643ba448bae886c1c51bc55060aa045337fa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?=
<2291200076@qq.com>
Date: Sun, 26 May 2024 23:13:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=20indexOf=20=E6=A0=A1?=
=?UTF-8?q?=E9=AA=8C=E9=80=BB=E8=BE=91=EF=BC=9B=E9=83=A8=E5=88=86=E5=AD=97?=
=?UTF-8?q?=E7=AC=A6=E4=B8=B2=E8=A7=A3=E4=B9=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
wp-includes/js/base.js | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/wp-includes/js/base.js b/wp-includes/js/base.js
index 41d513c..1dd585d 100644
--- a/wp-includes/js/base.js
+++ b/wp-includes/js/base.js
@@ -960,7 +960,7 @@ var yelem = document.getElementById("y");
var calgroup = document.getElementById("calgroup");
var cal1elem = document.getElementById("cal1");
var cal2elem = document.getElementById("cal2");
-window.addEventListener("DOMContentLoaded", function() {
+window.addEventListener("DOMContentLoaded", function () {
calgroup.style.display = "none";
var params = GetURLParams();
if (Object.keys(params).length > 0 && params.d != "") {
@@ -979,9 +979,7 @@ function GetURLParams() {
while (match = regex.exec(url)) {
params[match[1]] = match[2]
}
- if (url.indexOf('8jz') > -1) {
- return params
- }
+ return params
}
function swap() {
@@ -1012,7 +1010,7 @@ function base2decimal(x, dec, b) {
d = parseInt(x[i], b);
e = idot - i - 1;
e = e.toString();
- txt += "(" + d + " \u00D7 " + b + "" + e + ")";
+ txt += "(" + d + " × " + b + "" + e + ")";
if (i < len - 1) txt += " + "
}
if (minus) txt += "]";
@@ -1036,7 +1034,7 @@ function decimal2base(dec, y, b) {
var nd = y.length - y.indexOf(".") - 1;
if (nd > 6) nd = 6;
if (id >= 0 && nd > 0) {
- txt = "\u5c06\u76ee\u6807\u57fa\u6570\u4e58\u4ee5\u7ed3\u679c\u7684\u5c0f\u6570\u4f4d\u6570\u0028\u6700\u9ad8\u53ef\u8fbe\u0036\u4f4d\u6570\u0029\u003a
";
+ txt = "将目标基数乘以结果的小数位数(最高可达6位数):
";
txt += "floor(" + dec + "×" + b + "" + nd + ") = ";
dec = Math.floor(dec * Math.pow(b, nd));
txt += dec
@@ -1073,8 +1071,8 @@ function onconvert() {
y = y.toString(b2).toUpperCase();
yelem.value = y;
var yd = yelem.value.match(/[\dA-Z]/g);
- var ylabel = "\u8f6c\u6362\u7ed3\u679c\uff1a";
- if (yd != null) ylabel += " (" + yd.length + ((yd.length == 1) ? " \u4f4d)" : " \u4f4d)");
+ var ylabel = "转换结果:";
+ if (yd != null) ylabel += " (" + yd.length + " 位)";
document.getElementById("ylabel").innerHTML = ylabel;
document.getElementById("b1txt").innerHTML = b1;
document.getElementById("b2txt").innerHTML = b2;