首页
关于我们
友链链接
壁纸下载
更多
统计中心
热点搜索
图床上传
推荐
剩余价值
磁链清理
IP定位
Search
1
[Win DD包] wes7-x86-cn-精简,安装后仅占用1.55G存储空间
25,615 阅读
2
v2rayN基础使用教程、配置说明、添加订阅、路由选择
11,629 阅读
3
保姆级教程!甲骨文ARM DD成Debian10并升级内核成5.10
6,252 阅读
4
鸿蒙Next也能科学上网?Clash Meta for harmorny next os
6,181 阅读
5
N1教程:Openwrt安装docker webui界面(基于flippy openwrt n1固件)
5,334 阅读
Linux学堂
网站建设
网络资源
主题插件
固件工具
主机评测
MV频道
登录
Search
标签搜索
vps
typecho
linux
bench
mysql
cloudflare
nginx
lnmp
ssl
empirecms
openwrt
google
centos
docker
n1
301
qbittorrent
telegram
free
onedrive
V+变量
累计撰写
292
篇文章
累计收到
224
条评论
首页
栏目
Linux学堂
网站建设
网络资源
主题插件
固件工具
主机评测
MV频道
页面
关于我们
友链链接
壁纸下载
统计中心
热点搜索
图床上传
推荐
剩余价值
磁链清理
IP定位
搜索到
292
篇与
的结果
2024-12-02
评测脚本之网络速率检测speedtest-x
来源于BadApple9大佬,基于Speedtest-x开发的脚本。LibreSpeed 想必是大家用的最广泛的一款网页测速工具,经常有MJJ到论坛来发出自己服务器的测速网页让小伙伴测速,小伙伴会把自己网络的测速结果回帖告知楼主。speedtest-x 程序用于简化以上过程,程序会将各地用户的测速结果记录下来,并提供面板供网站主查看与排序,来评算出全国各地的速度最优运营商。这是 LibreSpeed 的延伸项目,基于其自身做了结果上报扩展。(LibreSpeed 也有自己的一套 PHP 结果上报程序,但需要依赖 MySQL 而且配置过程和界面并不友好),speedtest-x 做到了开箱即用。扩展细节用户测速会上传测速记录并保存至网站服务器不依赖 MySQL,使用文件数据库IP 库改用 ip.sb,运营商记录更为精确用户的测速IP会默认掩去 d 段,一定程度上保障测速者隐私使用1、下载本程序并解压到网站目录,访问 {你的网站地址}/index.html 进行测速2、打开 {你的网站地址}/results.html 查看测速记录Tips:backend/config.php 中可定义一些自定义配置: MAX_LOG_COUNT = 100:最大可保存多少条测速记录 IP_SERVICE = 'ip.sb':使用的 IP 运营商解析服务(ip.sb 或 ipinfo.io) SAME_IP_MULTI_LOGS = false:是否允许同一IP记录多条测速结果 PS:修改 backend/config.php 中的 MAX_LOG_COUNT 可定义最大可保存多少条测速记录开源地址:https://github.com/BadApple9/speedtest-x
2024年12月02日
75 阅读
0 评论
0 点赞
2024-12-02
评测脚本之测速脚本speedtest go
GITHUB作者原项目:https://github.com/BigMangos/speedtest-go-script使用方法环境要求支持的操作系统:CentOS 7-8、Debian 8-10、Ubuntu 16-18操作系统要求64位安装 bash <(curl -Lsk https://raw.githubusercontent.com/BigMangos/speedtest-go-script/master/install.sh)...
2024年12月02日
75 阅读
0 评论
0 点赞
2024-12-02
评测脚本之网络测速speedtest-py
SpeedtestSpeedtest测试网络上传/下载速度还是挺不错的,windows下非常方便。Linux下也可以很方便的使用命令行speedtest来测试。speedtest是一个用Python编写的轻量级Linux命令行工具,在Python2.4至3.4版本下均可运行。它基于Speedtest.net的基础架构来测量网络的上/下行速率。安装speedtest很简单——只需要下载其Python脚本文件。安装 wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py chmod a+rx speedtest.py mv speedtest.py /usr/local/bin/speedtest chown root:root /usr/local/bin/speedtest ...使用speedtest
2024年12月02日
73 阅读
0 评论
0 点赞
2024-12-02
评测脚本之丢包评测Ping.pe
Ping.pe这个是瓦工出品的丢包测试,可以看到各运营商的丢包数据 Ping: cc.5var.com ping port dig Host: cc.5var.com, IP: 104.21.3.9 – ARIN /20 AS13335 CLOUDFLARENET, - United States, California, San Francisco [content_delivery_network] MAP Location ISP Loss Sent Last Avg Best Worst StDev MTR Chart Canada, BC, Vancouver Telus 0% 7 58.54 58.4 57.65 58.82 0.35 show Canada, BC, Vancouver Shaw 0% 7 43.49 44.02 42.36 46.69 1.28 show USA, CA, Fremont Hurricane FMT2 0% 7 161.68 161.7 161.53 162.11 0.18 ... USA, CA, Fremont Linode 0% 7 2.27 2.28 2.25 2.36 0.04 ... USA, CA, San Francisco Digital Ocean 0% 7 1.11 1.38 1.08 3.01 0.67 ... USA, CA, Los Angeles QuadraNET 0% 7 1.22 1.2 1.17 1.26 0.03 show USA, CA, Los Angeles Vultr 0% 7 1.25 2.04 1.13 5.11 1.33 ... USA, CA, Seattle Google 0% 7 24.8 25.06 24.8 25.78 0.31 ... USA, CO, Denver Cogent 0% 7 23.86 19.65 17.92 23.86 1.96 show USA, TX, Dallas Softlayer 0% 7 24.19 24.62 24.15 25.24 0.46 show USA, IL, Chicago Cogent 0% 7 3.23 3.66 2.7 7.74 1.68 show USA, GA, Atlanta 55 Marietta/RamNode 0% 7 14.42 14.89 14.42 15.06 0.2 show USA, VA, Vint Hill OVH 0% 7 2.17 2.21 2.16 2.33 0.06 ... USA, NY, New York Telehouse/RamNode 0% 7 2.18 2.17 2.15 2.18 0.01 show Canada, QC, Montreal OVH 0% 7 14.17 14.14 13.83 14.26 0.15 ... France, Paris Online.net 0% 7 16.66 16.7 16.64 16.94 0.1 ... Netherlands, Amsterdam Online.net 0% 6 1.19 1.17 1.15 1.19 0.01 ... Netherlands, Nuland WeservIT/RamNode 0% 7 3.24 3.24 3.21 3.26 0.02 show Norway, Sandefjord Terrahost 0% 6 23.93 23.75 23.47 23.93 0.18 ... Germany, Nuremberg Hetzner 0% 6 10.08 10.12 10 10.41 0.13 ... Italy, Milan Prometeus 0% 6 22.9 23.01 21.96 25.3 1.09 show Singapore Digital Ocean 0% 6 2.24 1.49 1.13 2.24 0.5 show Japan, Tokyo Vultr 0% 7 1.07 1.3 1.07 2.19 0.37 show Australia, Sydney Vultr 0% 6 11.11 11.18 11.11 11.29 0.06 show Taiwan, Taichung Google 0% 6 37.48 38.11 37.48 39.14 0.53 show China, Shenzhen Aliyun 0% 6 192.15 191.98 191.48 192.88 0.52 ... China, Beijing Aliyun 0% 6 159.14 159.19 158.93 159.69 0.28 ... China, Beijing Tencent 0% 6 159.91 160.05 159.86 160.36 0.17 ... China, Quanzhou China Telecom CN2 0% 6 58.96 58.8 58.7 58.96 0.08 ... China, Jiangsu China Mobile 0% 6 198.95 198.86 198.41 199.18 0.23 ... China, Jiangsu China Unicom 0% 6 180.1 180.02 179.59 180.21 0.21 ... China, Hangzhou Aliyun 0% 6 136.1 136 135.39 136.35 0.32 ... China, Qingdao Aliyun 0% 6 181.92 182.39 181.92 183.16 0.55 ... China, Shanghai Aliyun 0% 6 189.45 189.95 189.45 190.99 0.52 ... For best connectivity to/from China we recommend BandwagonHost.[Slow mode][Advanced mode][Save as image] Test started: Thu Mar 25 2021 04:51:24 GMT+0800 (中国标准时间)...
2024年12月02日
24 阅读
0 评论
0 点赞
2024-12-02
评测脚本之回程路由Besttrace4Linux
Besttrace4Linux回程路由测试http://-IPIP.net出品特点Linux(X86/ARM)/Mac/BSD 系统环境下发起 traceroute 请求附带链路可视化兼容性强支持 JSON 格式使用 #下载 wget http://cdn.ipip.net/17mon/besttrace4linux.zip #解压 unzip besttrace4linux.zip #授权 chmod +x besttrace #使用 ./besttrace -q 1 这里是目标IP...如果是64位系统则直接besttrace替换besttrace32
2024年12月02日
63 阅读
0 评论
0 点赞
2024-12-02
评测脚本之网络速率检测Speedtest-Cli
Speedtest-Cli国外大佬Sivel作品特点测试网络上传/下载速率的一款工具Python2.4至3.4版本下均可运行使用 #下载 wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py #添加权限 chmod a+rx speedtest.py #执行 python speedtest.py...如果是64位系统则直接besttrace替换besttrace32
2024年12月02日
126 阅读
0 评论
0 点赞
2024-12-02
评测脚本之ping值检测PrettyPing.sh
PrettyPing.shDenilsonsa大佬写的Ping脚本特点基本用途相当于 ping 命令附带了更美观精细地彩色图示使用 wget https://raw.githubusercontent.com/denilsonsa/prettyping/master/prettyping mv prettyping /usr/local/bin chmod +x /usr/local/bin/prettyping prettyping 目标IP...
2024年12月02日
104 阅读
0 评论
0 点赞
2024-12-02
评测脚本之内存检测脚本memtester-cpp
FunctionClub大佬作品,本程序检测的可分配内存指的是用户使用时最大能占用的内存量。特点检测VPS真实可分配内存,适用于检测VPS超售情况使用 #CentOS / RHEL yum install wget -y yum groupinstall "Development Tools" -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out #Ubuntu / Debian apt-get update apt-get install wget build-essential -y wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp gcc -l stdc++ memtester.cpp ./a.out...
2024年12月02日
55 阅读
0 评论
0 点赞
2024-12-01
Typecho的原生评论区插入图片
只需要在主题的comment.php文件里面合适的位置添加下面代码即可。非常潦草,但是大致的功能实现了。<p style="height:2px"></p> <script LANGUAGE="JavaScript"> function openimgtp() {window.open ("https://imgse.com/upload", "newwindow", "height=600, width=800, top=100px,left=400px,toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")} </script> <div title="上传到图床后复制HTML代码到评论区窗口即可" class="smallscreen"><button type="button" onclick="openimgtp()" style="background-color:#ffffff;font-size:12px;border-color:#ffffff;z-index: 101;border-radius: 4px;">上传图片</button> (上传到图床后复制HTML图像代码到评论区即可)</div>...基于chevereto图床插件关于什么是chevereto,其实就是一个图床系统,路过图床、遇见图床都是基于这个框架。相关插件的使用说明可以阅读官方使用文档:Popup Upload Plugin-官方说明文档(需要注意的是,这段代码是经过优化的,而不是原生的pup.js代码。当然封装这段代码是更加正确的做法!)chevereto(); var isTrigger = false; function chevereto(){ (function() { for (var t = { defaultSettings: { url: "https://imgloc.com/upload", vendor: "auto", mode: "manual", lang: "auto", autoInsert: "html-embed", palette: "clear", init: "onload", containerClass: 1, buttonClass: 1, sibling: 0, siblingPos: "after", fitEditor: 0, observe: 0, observeCache: 1, html: '<div class="%cClass"><button %x class="%bClass"><span class="%iClass">%iconSvg</span><span class="%tClass">%text</span></button></div>', css: ".%cClass{display:inline-block;margin-top:5px;margin-bottom:5px}.%bClass{line-height:normal;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;outline:0;color:%2;border:none;cursor:pointer;border:1px solid rgba(0,0,0,.15);background:%1;border-radius:.2em;padding:.5em 1em;font-size:12px;font-weight:700;text-shadow:none}.%bClass:hover{background:%3;color:%4;border-color:rgba(0,0,0,.1)}.%iClass,.%tClass{display:inline-block;vertical-align:middle}.%iClass svg{display:block;width:1em;height:1em;fill:currentColor}.%tClass{margin-left:.25em}" }, ns: { plugin: "chevereto-pup" }, palettes: { default: ["#ececec", "#333", "#2980b9", "#fff"], clear: ["inherit", "inherit", "inherit", "#2980b9"], turquoise: ["#16a085", "#fff", "#1abc9c", "#fff"], green: ["#27ae60", "#fff", "#2ecc71", "#fff"], blue: ["#2980b9", "#fff", "#3498db", "#fff"], purple: ["#8e44ad", "#fff", "#9b59b6", "#fff"], darkblue: ["#2c3e50", "#fff", "#34495e", "#fff"], yellow: ["#f39c12", "#fff", "#f1c40f", "#fff"], orange: ["#d35400", "#fff", "#e67e22", "#fff"], red: ["#c0392b", "#fff", "#e74c3c", "#fff"], grey: ["#ececec", "#000", "#e0e0e0", "#000"], black: ["#333", "#fff", "#666", "#fff"] }, classProps: ["button", "container"], iconSvg: '<svg class="%iClass" xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M76.7 87.5c12.8 0 23.3-13.3 23.3-29.4 0-13.6-5.2-25.7-15.4-27.5 0 0-3.5-0.7-5.6 1.7 0 0 0.6 9.4-2.9 12.6 0 0 8.7-32.4-23.7-32.4 -29.3 0-22.5 34.5-22.5 34.5 -5-6.4-0.6-19.6-0.6-19.6 -2.5-2.6-6.1-2.5-6.1-2.5C10.9 25 0 39.1 0 54.6c0 15.5 9.3 32.7 29.3 32.7 2 0 6.4 0 11.7 0V68.5h-13l22-22 22 22H59v18.8C68.6 87.4 76.7 87.5 76.7 87.5z" style="fill: currentcolor;"/></svg>', l10n: { ar: "تحميل الصور", cs: "Nahrát obrázky", da: "Upload billeder", de: "Bilder hochladen", es: "Subir imágenes", fi: "Lataa kuvia", fr: "Importer des images", id: "Unggah gambar", it: "Carica immagini", ja: "画像をアップロード", nb: "Last opp bilder", nl: "Upload afbeeldingen", pl: "Wyślij obrazy", pt_BR: "Enviar imagens", ru: "Загрузить изображения", tr: "Resim Yukle", uk: "Завантажити зображення", zh_CN: "上传图片", zh_TW: "上傳圖片" }, vendors: { default: { check: function() { return 1 }, getEditor: function() { var t = { textarea: { name: ["recaptcha", "search", "recipients", "coppa", "^comment_list", "username_list", "add"] }, ce: { dataset: ["gramm"] } }, e = ["~", "|", "^", "$", "*"], i = {}; for (var s in t) { i[s] = ""; var n = t[s]; for (var r in n) for (var o = 0; o < n[r].length; o++) { var a = "", l = n[r][o], d = l.charAt(0); e.indexOf(d) > -1 && (a = d, l = l.substring(1)), i[s] += ":not([" + ("dataset" == r ? "data-" + l: r + a + '="' + l + '"') + "])" } } return document.querySelectorAll('[contenteditable=""]' + i.ce + ',[contenteditable="true"]' + i.ce + ",textarea:not([readonly])" + i.textarea) } } }, generateGuid: function() { var t = (new Date).getTime(); return "undefined" != typeof performance && "function" == typeof performance.now && (t += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) { var i = (t + 16 * Math.random()) % 16 | 0; return t = Math.floor(t / 16), ("x" === e ? i: 3 & i | 8).toString(16) }) }, getNewValue: function(t, e) { var i = "string" != typeof t.getAttribute("contenteditable") ? "value": "innerHTML", s = "value" == i ? "\n": "<br>", n = t[i], r = e, o = !1; if (o && (r = String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """)), 0 == n.length) return r; var a = "", l = n.match(/\n+$/g), d = l ? l[0].split("\n").length: 0; if (d <= 2) { var u = 0 == d ? 2 : 1; a += s.repeat(u) } return a + r }, insertTrigger: function() { var t, e = this.vendors[this.settings.vendor], i = this.settings.sibling ? document.querySelectorAll(this.settings.sibling + ":not([" + this.ns.dataPlugin + "])")[0] : 0; if ("auto" == this.settings.mode) t = this.vendors[e.hasOwnProperty("getEditor") ? this.settings.vendor: "default"].getEditor(); else { for (var s = document.querySelectorAll("[" + this.ns.dataPluginTrigger + "][data-target]:not([" + this.ns.dataPluginId + "])"), n = [], r = 0; r < s.length; r++) n.push(s[r].dataset.target); n.length > 0 && (t = document.querySelectorAll(n.join(","))) } if (t) { if (!document.getElementById(this.ns.pluginStyle) && this.settings.css) { var o = document.createElement("style"), a = this.settings.css; a = this.appyTemplate(a), o.type = "text/css", o.innerHTML = a.replace(/%p/g, "." + this.ns.plugin), o.setAttribute("id", this.ns.pluginStyle), document.body.appendChild(o) } t instanceof NodeList || (t = [t]); var l = 0; for (r = 0; r < t.length; r++) if (!t[r].getAttribute(this.ns.dataPluginTarget)) { var d = i || t[r]; d.setAttribute(this.ns.dataPlugin, "sibling"), d.insertAdjacentHTML({ before: "beforebegin", after: "afterend" } [this.settings.siblingPos], this.appyTemplate(this.settings.html)); var u = d.parentElement.querySelector("[" + this.ns.dataPluginTrigger + "]"); this.setBoundId(u, t[r]), l++ } this.triggerCounter = l, "function" == typeof e.callback && e.callback.call() } isTrigger = true; }, appyTemplate: function(t) { if (!this.cacheTable) { var e = [{ "%iconSvg": this.iconSvg }, { "%text": this.settings.langString }]; if (this.palette) { for (var i = /%(\d+)/g, s = i.exec(t), n = []; null !== s;) - 1 == n.indexOf(s[1]) && n.push(s[1]), s = i.exec(t); if (n) { n.sort(function(t, e) { return e - t }); this.vendors[this.settings.vendor]; for (var r = 0; r < n.length; r++) { var o = n[r] - 1, a = this.palette[o] || ""; a || "default" === this.settings.vendor || "default" === this.settings.palette || (a = this.palette[o - 2]); var l = {}; l["%" + n[r]] = a, e.push(l) } } } var d = this.settings.buttonClass || this.ns.plugin + "-button", u = [{ "%cClass": this.settings.containerClass || this.ns.plugin + "-container" }, { "%bClass": d }, { "%iClass": d + "-icon" }, { "%tClass": d + "-text" }, { "%x": this.ns.dataPluginTrigger }, { "%p": this.ns.plugin }]; for (r = 0; r < u.length; r++) e.push(u[r]); this.cacheTable = e } return this.strtr(t, this.cacheTable) }, strtr: function(t, e) { t = t.toString(); if (!t || void 0 === e) return t; for (var i = 0; i < e.length; i++) { var s = e[i]; for (var n in s) void 0 !== s[n] && (re = new RegExp(n, "g"), t = t.replace(re, s[n])) } return t }, setBoundId: function(t, e) { var i = this.generateGuid(); t.setAttribute(this.ns.dataPluginId, i), e.setAttribute(this.ns.dataPluginTarget, i) }, openPopup: function(t) { if ("string" == typeof t) { var e = this; if (void 0 === this.popups && (this.popups = {}), void 0 === this.popups[t]) { this.popups[t] = {}; var i = { l: null != window.screenLeft ? window.screenLeft: screen.left, t: null != window.screenTop ? window.screenTop: screen.top, w: window.innerWidth ? window.innerWidth: document.documentElement.clientWidth ? document.documentElement.clientWidth: screen.width, h: window.innerHeight ? window.innerHeight: document.documentElement.clientHeight ? document.documentElement.clientHeight: screen.height }, s = { w: 720, h: 690 }, n = { w: .5, h: .85 }; for (var r in s) s[r] / i[r] > n[r] && (s[r] = i[r] * n[r]); var o = { l: Math.trunc(i.w / 2 - s.w / 2 + i.l), t: Math.trunc(i.h / 2 - s.h / 2 + i.t) }; this.popups[t].window = window.open(this.settings.url, t, "width=" + s.w + ",height=" + s.h + ",top=" + o.t + ",left=" + o.l), this.popups[t].timer = window.setInterval(function() { e.popups[t].window && !1 === e.popups[t].window.closed || (window.clearInterval(e.popups[t].timer), e.popups[t] = void 0) }, 200) } else this.popups[t].window.focus() } }, postSettings: function(t) { this.popups[t].window.postMessage({ id: t, settings: this.settings }, this.settings.url) }, liveBind: function(t, e, i) { document.addEventListener(e, function(e) { var s = document.querySelectorAll(t); if (s) { for (var n = e.target, r = -1; n && -1 === (r = Array.prototype.indexOf.call(s, n));) n = n.parentElement; r > -1 && (e.preventDefault(), i.call(e, n)) } }, !0) }, prepare: function() { var t = this; this.ns.dataPlugin = "data-" + this.ns.plugin, this.ns.dataPluginId = this.ns.dataPlugin + "-id", this.ns.dataPluginTrigger = this.ns.dataPlugin + "-trigger", this.ns.dataPluginTarget = this.ns.dataPlugin + "-target", this.ns.pluginStyle = this.ns.plugin + "-style", this.ns.selDataPluginTrigger = "[" + this.ns.dataPluginTrigger + "]"; var e = document.currentScript || document.getElementById(this.ns.plugin + "-src"); e ? e.dataset.buttonTemplate && (e.dataset.html = e.dataset.buttonTemplate) : e = { dataset: {} }; var i = 0; for (var s in this.settings = {}, this.defaultSettings) { var n = e && e.dataset[s] ? e.dataset[s] : this.defaultSettings[s]; "1" !== n && "0" !== n || (n = "true" == n), "string" == typeof n && this.classProps.indexOf(s.replace(/Class$/, "")) > -1 && (i = 1), this.settings[s] = n } if ("auto" == this.settings.vendor) for (var s in this.settings.vendor = "default", this.settings.fitEditor = 0, this.vendors) if ("default" != s && void 0 !== window[this.vendors[s].check]) { this.settings.vendor = s; break } var r = ["lang", "url", "vendor", "target"]; "default" == this.settings.vendor && (this.vendors. default.settings = {}); var o = this.vendors[this.settings.vendor]; if (o.settings) for (var s in o.settings) e && e.dataset.hasOwnProperty(s) || (this.settings[s] = o.settings[s]); else for (var s in o.settings = {}, this.defaultSettings) - 1 == r.indexOf(s) && (o.settings[s] = this.defaultSettings[s]); if ("default" !== this.settings.vendor) if (o.settings.hasOwnProperty("fitEditor") || e.dataset.hasOwnProperty("fitEditor") || (this.settings.fitEditor = 1), this.settings.fitEditor) i = !o.settings.css; else { r = ["autoInsert", "observe", "observeCache"]; for (var s in o.settings) - 1 != r.indexOf(s) || e.dataset.hasOwnProperty(s) || (this.settings[s] = this.defaultSettings[s]) } if (i) this.settings.css = ""; else { this.settings.css = this.settings.css.replace("%defaultCSS", this.defaultSettings.css), o.settings.extracss && this.settings.css && (this.settings.css += o.settings.extracss); var a = this.settings.palette.split(","); a.length > 1 ? this.palette = a: this.palettes.hasOwnProperty(a) || (this.settings.palette = "default"), this.palette || (this.palette = (this.settings.fitEditor && o.palettes && o.palettes[this.settings.palette] ? o: this).palettes[this.settings.palette]) } for (var l = this.classProps, d = 0; d < l.length; d++) { var u = l[d] + "Class"; "string" != typeof this.settings[u] && (this.settings[u] = this.ns.plugin + "-" + l[d], this.settings.fitEditor && (this.settings[u] += "--" + this.settings.vendor)) } var c = ("auto" == this.settings.lang ? navigator.language || navigator.userLanguage: this.settings.lang).replace("-", "_"); this.settings.langString = "Upload images"; var g = c in this.l10n ? c: c.substring(0, 2) in this.l10n ? c.substring(0, 2) : null; g && (this.settings.langString = this.l10n[g]); var h = document.createElement("a"); h.href = this.settings.url, this.originUrlPattern = "^" + (h.protocol + "//" + h.hostname).replace(/\./g, "\\.").replace(/\//g, "\\/") + "$"; var f = document.querySelectorAll(this.ns.selDataPluginTrigger + "[data-target]"); if (f.length > 0) for (d = 0; d < f.length; d++) { var p = document.querySelector(f[d].dataset.target); this.setBoundId(f[d], p) } if (this.settings.observe) { var b = this.settings.observe; this.settings.observeCache && (b += ":not([" + this.ns.dataPlugin + "])"), this.liveBind(b, "click", function(e) { e.setAttribute(t.ns.dataPlugin, 1), t.observe() }.bind(this)) } this.settings.sibling && !this.settings.onDemand ? this.waitForSibling() : "onload" == this.settings.init ? "loading" === document.readyState ? document.addEventListener("DOMContentLoaded", function(e) { t.init() }, !1) : this.init() : this.observe() }, observe: function() { this.waitForSibling("observe") }, waitForSibling: function(t) { var e = this.initialized ? "insertTrigger": "init"; if (this.settings.sibling) var i = document.querySelector(this.settings.sibling + ":not([" + this.ns.dataPlugin + "])"); else if ("observe" == t && (this[e](), this.triggerCounter)) return; if (i) this[e](); else { if ("complete" === document.readyState && "observe" !== t) return; setTimeout(("observe" == t ? this.observe: this.waitForSibling).bind(this), 250) } }, init: function() { if(isTrigger === true) { return; } this.insertTrigger(); var t = this, e = this.vendors[this.settings.vendor]; this.liveBind(this.ns.selDataPluginTrigger, "click", function(e) { var i = e.getAttribute(t.ns.dataPluginId); t.openPopup(i) }), window.addEventListener("message", function(i) { var s = new RegExp(t.originUrlPattern, "i"); if (s.test(i.origin) || void 0 !== i.data.id && void 0 !== i.data.message) { var n = i.data.id; if (n && i.source === t.popups[n].window) if (i.data.requestAction && t.hasOwnProperty(i.data.requestAction)) t[i.data.requestAction](n); else { var r; if ("default" !== t.settings.vendor) { if (e.hasOwnProperty("useCustomEditor") && e.useCustomEditor()) return void e.editorValue(i.data.message, n); e.hasOwnProperty("getEditor") && (r = e.getEditor()) } if (r || (r = document.querySelector("[" + t.ns.dataPluginTarget + '="' + n + '"]'), r)) { var o = null === r.getAttribute("contenteditable") ? "value": "innerHTML"; r[o] += t.getNewValue(r, i.data.message); for (var a = ["blur", "focus", "input", "change", "paste"], l = 0; l < a.length; l++) { var d = new Event(a[l]); r.dispatchEvent(d) } } else alert("Target not found") } } }, !1), this.initialized = 1 } }, e = ["WoltLab", "XF1"], i = 0; i < e.length; i++) t.vendors[e[i]] = Object.assign(Object.assign({}, t.vendors.redactor2), t.vendors[e[i]]); t.prepare() })(); };...上面的js代码确实挺长,你可以封装到一个js文件,然后在head标签中引入,这样可以优化网页的格式。然后就是调用了。在主题的comment.php位置,插入调用的button代码:<div class="OwO padder-v-sm" style="display:inline"></div><p style="height:2px"></p> <div title="上传到图床后自动插入HTML代码" class="smallscreen"> <button type="button" data-chevereto-pup-trigger data-target="#comment" style="background-color:#ffffff;font-size:12px;border-color:#ffffff;z-index: 101;border-radius: 4px;">上传图片</button> </div>...备用chevereto图床这里推荐几个备用的图床,都是基于chevereto的框架,如果想更换图床,可以直接把js代码里面的defaultSettings下的url进行修改即可。非常的便捷。1、路过图床(运营稳定的图床):https://imgse.com/upload2、七喜图床(速度很快的图床):https://7up.pics/upload3、老王图床:https://img.gejiba.com/upload4、loc图床:https://imgloc.com/upload5、picgo图床:https://www.picgo.net/upload6、ImgBB图床:https://imgbb.com/upload7、MJJTODAY:https://mjj.today/upload
2024年12月01日
55 阅读
0 评论
0 点赞
2024-12-01
懒人站长专享:零基础制作网站LOGO和站点ICO图标
网站logo是品牌形象的重要组成部分,对网站的成功起着至关重要的作用。一个设计精美的logo能帮助你吸引更多的用户,提升品牌知名度,并最终实现商业目标。1. 在线LOGO制作1)打开U钙网 https://www.uugai.com/U钙网简介:是一个专业的智能AI商标logo设计平台,无论你董不懂设计,仅需输入文字,您就可以自助设计出专业、精美的LOGO标志,100%U钙网原创,无限制免费下载,十几年专业专注智能LOGO设计,服务用户已超千万。2)输入LOGO名字后,点击开始制作;3)选择你中意的LOGO,随后的进入页面可以选择底色和主题色;4)点击上方的动物图标,可以选择各种动物图标、字母图标等,发挥你的想象力,之后选择下载LOGO就行了,是不是很简单。2. 在线ICO制作接下来讲下如何生成站点ICO1)打开ICO制作网站: https://tool.lu/favicon ;2)点击选择图片,这里可以选择刚才制作的LOGO;3)移动选择框,选择你需要的部分,选择ICO大小,选择格式为ICO,之后下载到自己电脑并上传网站就好了。
2024年12月01日
86 阅读
4 评论
0 点赞
1
...
22
23
24
...
30