您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
百度首页深度美化——我们有幸降落在这个星球...这是他们一生也无法看到的风景...
当前为
// ==UserScript== // @name 星凰·众里寻她千百度 // @version 5.29 // @author 科技星凰 // @namespace https://space.bilibili.com/379335206 // @match https://www.baidu.com/ // @match https://www.baidu.com/?bs_nt=1 // @match https://www.baidu.com/?tn=* // @description 百度首页深度美化——我们有幸降落在这个星球...这是他们一生也无法看到的风景... // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js // @supportURL https://jq.qq.com/?_wv=1027&k=IMqY916N // @icon https://cdn.jsdelivr.net/gh/loktindyi/mybaiduhp@master/tri-bdhp-icon.png // @run-at document-idle // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_xmlhttpRequest // @note 5.27 不再支持5.25以下版本升级到此版本 // @note 5.28 填补 // @note 5.29 修复了一个逻辑错误 该错误导致:在"壁纸与微软必应同步"开启与"昼夜更替"关闭时,微软必应壁纸未能被加载 // ==/UserScript== (() => { console.time("星凰·众里寻她千百度\n\t本次耗时"); const TRI_UPDATE_NOTICE = [` 星凰·新春祝愿:<br> [logo]新增:哔哩哔哩四季·春<br> <br><span> <strong>右边缘双击</strong>可打开配置 </span> `, 4 ]; const IMAGES = [ "http://g.hiphotos.baidu.com/zhidao/pic/item/8644ebf81a4c510f973523a36b59252dd52aa592.jpg", "//www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png", "https://cdn.jsdelivr.net/gh/loktindyi/mybaiduhp@master/tri-bdhp-icon.png", "https://img.tujidu.com/image/5f8d99dfba42a.jpg" ]; const SEASON_LOGO = [ "https://i0.hdslb.com/bfs/vc/c1e19150b5d1e413958d45e0e62f012e3ee200af.png", "https://i0.hdslb.com/bfs/archive/e62b6b095ef38dfb742687f11e4b570dde420b5d.png", "https://i0.hdslb.com/bfs/archive/622017dd4b0140432962d3ce0c6db99d77d2e937.png", "https://i0.hdslb.com/bfs/vc/fb9521333b8ea79d90bdfc6da31cf83c52d93ec9.png" ]; const API = [ "https://api.bilibili.com/x/web-show/res/locs?pf=0&ids=142", "https://www.bing.com/HPImageArchive.aspx?format=js&n=1" ]; const her = { drawIptStyle: false, //搜索框 hideSearchBtn: false, //搜索按钮 vzin: false, //维新 pageTiltle: "众里寻她千百度", //标题 topLeft: false, //左上角推广 userList: false, //右上角用户 hotNews: false, //新闻 inputLenTillTop: 90, //搜索框位置 inputFontSize: 20, //字体大小 pageBackgroundImg: IMAGES[3], //背景图片地址 pageBackgroundImgBing: false, //必应背景图 pageBackgroundImgNight: true, //夜间护眼 backgroundEndlessNight: false, replaceLogo: 0, //logo season: 3, //季节 cusLogoUrl: "", //自定义logourl tipDeLogo: "", //logo提示语 targetDeLogo: false, //跳转方式 logoLinksTo: "", //链接到 thmColor: [ "#222c", "#fa7298" ] //fc fo }; const lingvo = { update: "星凰升级完成", say: "world.say\n\t", welcome: "星凰·众里寻她千百度:\n\t欢迎来到这个星球。", vzin: "维新开始工作。", bing: "壁纸与微软必应同步:\n\t", night: "昼夜更替-晴空不在", season: "logo同步哔哩哔哩四季\n\t", bili: "logo与哔哩哔哩同步\n\t", custome: "自定义logo:\n\t", tri: [ "world.execute(me);", "你好...", "干嘛?没事别点我", "你怎么还点??", "再点我就生气了,后果很严重!", "我生气了!你 完 蛋 啦 !!" ], save: "记忆装填中..." }; const you = "USER_CONFIG", me = "ct"; const TRI_HTML = `<input type="button" class="tri-dis btn" ondblclick="$('#tri-fds')[0].className=$('#tri-fds')[0].className!='in'?'in':'out'"><div id="tri-fds" class="ts" oninput="$('#tri-styles')[0].innerHTML=$('#tri-ell')[0].innerText"><fieldset><legend class="fdt">星凰·众里寻她千百度</legend><input type="button" class="save-btn b-a btn" title="保存" value="铭记"><br><br><hr><label><input id="vsearch" type="checkbox"> 搜索框优化   </label><label><input id="vbtn" type="checkbox"> 隐藏搜索按钮     </label><label title="控制台输出更多信息"><input id="vzin" type="checkbox"> 维新</label><br>网页标题 <input id="pagetitle" type="text" class="fs-ipt" placeholder="垃圾百度,毁我青春"><br><label title="移除左上角推广"><input id="topleft" type="checkbox"> 移除左上角推广 </label><label title="移除右上角"><input id="vuser" type="checkbox"> 移除右上角用户 </label><br><label title="移除偶现的新闻"><input id="vnews" type="checkbox"> 移除新闻热榜</label><br>搜索框位置 <input id="ipos" type="number" class="fs-ipt ipnum" oninput="$('#iptlen')[0].innerText=this.value" placeholder="90">字体大小 <input id="ipfz" type="number" class="fs-ipt ipnum" placeholder="18"><br><div title="背景">背景 <label><input id="bgimg-bing" type="checkbox" onchange="$('#bgimg')[0].disabled=this.checked"> 与微软必应同步 </label><label title="18:00-次日7:00使用黑色背景图"><input id="bgimg-night" type="checkbox"> 昼夜更替</label><label title="使用黑色背景图"><input id="bg-endless-night" oninput="$('#bgimg-night')[0].disabled=this.checked;$('#bgimg')[0].disabled=this.checked" type="checkbox"> 永夜</label><br>或者 <input id="bgimg" style="width:70%" type="text" class="fs-ipt" placeholder="https...xxx.png/jpg" oninput="$('#sbgimg')[0].innerText=this.value==''?'':'background-image: url('+this.value+')'" autocomplete="off"></div><div title="关于LOGO...">logo替换为 <select id="vlogo" onchange="$('#cuslgurl')[0].style.display=$('#op666')[0].selected?'block':'none'"><option value="0">不替换</option><option value="-3" style="color:#4e6ef2">常态·百度</option><option value="-2" style="color:#000a">隐藏式</option><option value="-1">移除</option><option value="1" style="color:#9ECE60">哔哩哔哩四季</option><option value="233" style="color:#fa7298">与哔哩哔哩同步</option><option value="666" id="op666">自定义</option></select><input id="cuslgurl" type="text" class="fs-ipt cus-lg" style="display:none" placeholder="https...xxx.png" autocomplete="off"></div>并在鼠标停留logo上时提示 <input id="lgtip" type="text" class="fs-ipt" style="width:30%" placeholder="哔哩哔哩"><br><div title="跳转方式">点击logo后从 <label title="当前页面"><input id="lgtars" type="radio" name="target_de_logo"> 当前页 </label><label title="新标签页"><input id="lgtar" type="radio" name="target_de_logo"> 新世界</label></div>打开这个页面 <input id="lglinksto" type="text" class="fs-ipt" style="width:50%" placeholder="https://www.bilibili.com" autocomplete="off"><br><br><div><span style="font-size:large;color:var(--thm-fo)">妖染</span>(百度蓝:#4E6EF2)<br>字体 <input type="text" class="thmcolor fs-ipt" oninput="$('.scolor')[0].innerText=this.value" autocomplete="off"><br>主题 <input type="text" class="thmcolor fs-ipt" oninput="$('.scolor')[1].innerText=this.value" autocomplete="off"></div></fieldset><br><div title="星凰言语"><span class="trilato">世人愿还天朗朗<br><a class="joinus" href="https://jq.qq.com/?_wv=1027&k=IMqY916N" title="加入群" value="星凰"><img class="trimg" alt="星凰"></a><span>尘土之下骨凄凉</span></span></div></div><span id="tri-ell" style="display:none"></span><style id="tri-styles" type="text/css"></style>`; const TRI_CSS_TEXT = { sei: `html {overflow: hidden}#head_wrapper .ipt_rec,#head_wrapper .soutu-btn {display: none}#head_wrapper #kw,#head_wrapper #kw:focus {background-image: linear-gradient(-45deg, transparent 8px, var(--tri-bg) 0, var(--tri-bg) calc(100% - 8px), transparent 0);color: var(--thm-fc) !important}#head_wrapper #form .bdsug-new {position: absolute;left: 7%;top: 55px !important;background-color: #fff0;background-image: linear-gradient(-45deg, transparent 8px, var(--tri-bg) 0, var(--tri-bg) calc(100% - 8px), transparent 0);border-radius: 0;border: none !important;position: absolute;top: 55px}#head_wrapper .s_btn,#head_wrapper .s_btn:hover {background-color: transparent}#head_wrapper .s_btn,#head_wrapper .s_btn_wr {width: 104px;height: 40px;}#head_wrapper .s_btn_wr {background-image: linear-gradient(-45deg, transparent 8px, var(--thm-fo) 0);}#head_wrapper .s_btn {position: absolute;top: -2px;border-radius: 0;}.bdsug-s,.bdsug-s b {color: var(--thm-fo) !important;font-size: large !important}#head_wrapper #form .bdsug-new ul {border-top: none;}#head_wrapper .soutu-env-nomac #form #kw {width: 618px !important;padding-right: 16px !important;border: none;border-radius: 0;background-color: transparent;text-align: center}`, seu: `#head_wrapper .soutu-env-nomac #form #kw,#head_wrapper #form #kw {width: 582px !important;border-radius: 10px;}#head_wrapper .s_btn,#head_wrapper .s_btn:hover {background-color: var(--thm-fo)}`, others: `#bottom_layer {display: none}#s_side_wrapper {display: none}#head_wrapper #kw {font-size: calc(var(--ipt-fz) * 1px)}#head .head_wrapper {top: calc(var(--ipt-len) * 1px)}#s_top_wrap {display: none}#blind-box {display: none !important}body {background-size: cover;background-attachment: fixed}#headwrapper #form .bdsug-new user_list {border-top-color: transparent}.s-weather-wrapper:hover .show-city-name,.s-weather-wrapper:hover .show-icon-temp,.s-top-right .s-top-right-text:hover,.s-top-left .mnav:hover .s-bri,.s-top-left a:hover,.s-top-left .s-top-more .s-top-more-content>a:hover .s-top-more-title,.s-top-right .s-top-username .user-name:hover,.s-hotsearch-wrapper .s-hotsearch-title .hot-refresh:hover,.c-link:hover,.s-top-userset-menu a:hover,.bdsug-s,.bdsug-s b {color: var(--thm-fo) !important}.s-top-right .s-top-username .s-top-img-wrapper,#head_wrapper #kw:focus,#head_wrapper #form #kw.new-ipt-focus,#head_wrapper #form .bdsug-new {border-color: var(--thm-fo) !important}.s-weather-wrapper .s-mod-weather .weather-mod .show-pollution .show-polution-name,.c-btn-primary {background-color: var(--thm-fo)}`, tris: `:root {--tri-bg: #fffd}@keyframes appear {from {visibility: hidden;opacity: 0}to {visibility: visible;opacity: 1}}@keyframes fullfadeout {from {visibility: visible;opacity: 1}to {visibility: hidden;opacity: 0}}@keyframes fadeout {from {opacity: 0.85}to {opacity: 0}}@keyframes tminus {from {width: 0}to {width: 320px}}#tri-fds input[type=checkbox],#tri-fds input[type=radio] {position: relative;height: 0}#tri-fds input[type=checkbox]::before,#tri-fds input[type=radio]::before {content: "";width: 12px;height: 12px;position: absolute;left: 0;top: -12px;border: 1px solid var(--thm-fo);border-radius: 50%;}#tri-fds input[type=checkbox]:checked::before,#tri-fds input[type=radio]:checked::before {background-color: var(--thm-fo);}#tri-fds input[type=checkbox]:disabled::before,#tri-fds input[type=radio]:disabled::before {background-color: grey;border: none;}#tri-fds input[type=text]:disabled {border-bottom-color: grey}.trisay {user-select: none;overflow: hidden;min-width: 60px;background-image: linear-gradient(-45deg, transparent 5px, var(--tri-bg) 0, var(--tri-bg) calc(100% - 5px), transparent 0);opacity: 0.85;width: 320px;height: auto;font-size: 16px;min-height: 30px;line-height: 30px;text-align: center;position: fixed;top: 60%;left: 40%;z-index: 998}.trisay strong {color: var(--thm-fo);}.trisay span {font-size: smaller}.trisay hr {height: 5px;border: none;background-image: linear-gradient(-45deg, transparent 4px, var(--thm-fo) 0);animation: tminus var(--hr-time) linear forwards;z-index: 999}.fadeout {animation: fadeout 0.5s forwards}.ts {display: none;opacity: 0}.in {animation: appear 0.8s forwards}.out {animation: fullfadeout 0.8s forwards}.fs-ipt {padding-left: 5px;background-color: transparent;border: none;border-bottom: 1px solid var(--thm-fo);outline: none;height: 18px;font-size: 60%;z-index: 997}#vlogo {border: none;background-color: transparent;height: 16px;font-size: 12px;outline: none}.cus-lg {position: absolute;right: 5%;top: 43%;width: 28%}.ipnum {width: 12%}.btn {outline: none;border: none;position: absolute;}.b-a {background-image: linear-gradient(-45deg, transparent 6px, var(--thm-fo) 0, var(--thm-fo) calc(100% - 6px), transparent 0);background-color: transparent;color: white}.tri-dis {top: 0;right: -2px;width: 7px;height: 100%;background-color: transparent;background-image: linear-gradient(to left, var(--thm-fo), transparent);opacity: 0}.tri-dis:hover {animation: appear 0.1s linear forwards}.save-btn {font-size: large;top: 2%;right: 4%;width: 80px;height: 40px;z-index: 998}.joinus {position: absolute;bottom: 0;left: 0;width: 46px;height: 40px}.fdt {color: var(--thm-fo);font-size: 23px;position: absolute;top: 3%;left: 3%;}#tri-fds {position: fixed;top: 7%;right: 5%;border-color: #0000;padding: 15px;font-size: 14px;line-height: 200%;height: 600px;color: #222;width: 300px;border-radius: 10px;background-image: linear-gradient(-45deg, transparent 10px, var(--tri-bg) 0, var(--tri-bg) calc(100% - 10px), transparent 0);text-align: left;user-select: none;z-index: 996}#tri-fds hr {height: 1px;border: none;background-color: var(--thm-fo);z-index: 997}.trilato {padding: 10px;background-image: linear-gradient(-45deg, transparent 10px, #fff3 0, #fff3 calc(100% - 10px), transparent 0);position: absolute;width: calc(100% - 50px);height: 10%;cursor: pointer;font-size: large;color: var(--thm-fo)}.trilato span {position: absolute;right: 10px}.trilato img {position: absolute;bottom: 5px;left: 5px;width: 36px;}`, night: `:root {--tri-bg: #fffa}body {background-color: #222;background-image: none}#head_wrapper #kw,.s-top-userset-menu,.soutu-hover-tip,#head_wrapper #form .bdsug-new,.s-top-left .s-top-more {background-color: #222 !important;color: #ccc !important}.soutu-btn {background-color: transparent !important}#head_wrapper #form .bdsug-new ul {border-top-color: #ccc;}.c-link,.c-color-t,.s-top-userset-menu a,#head_wrapper #form .bdsug-new ul li,#head_wrapper #form .bdsug-new ul li b {color: #ccc}` }; const world = { draw: GM_addStyle, rise: GM_setValue, take: GM_getValue, execute: GM_deleteValue, require: GM_xmlhttpRequest, wait: (t, f) => { setTimeout(f, t * 1000) }, repeat: { engage: (t, f) => { return setInterval(f, t * 1000) }, execute: (f) => { clearInterval(f) } }, log: (l) => { console.log('%c TriLingvo %c\n' + l, 'color:#fff;background-color:#fa7298;border-radius:8px', ''); }, say: (msg, t) => { t = isNaN(t) ? 3 : t; if ($('.trisay')[0]) document.body.removeChild($('.trisay')[0]); world.draw(`:root{--hr-time: ` + t + `s}`); let m = document.createElement('div'); let n = document.createElement('hr'); m.className = "trisay"; m.innerHTML = msg; document.body.appendChild(m); m.appendChild(n); if (yourData.vzin) world.log(lingvo.say + msg); world.wait(t, () => { m.className += " fadeout"; world.wait(1, () => { document.body.removeChild(m); }); }); }, update: () => { // world.say(TRI_UPDATE_NOTICE[0], TRI_UPDATE_NOTICE[1]); if (TRI_UPDATE_NOTICE[0] != yourData.triSay) { world.say(TRI_UPDATE_NOTICE[0], TRI_UPDATE_NOTICE[1]); yourData.triSay = TRI_UPDATE_NOTICE[0] }; world.rise(you, yourData); if (yourData.vzin) world.log(lingvo.update) }, savl: (s) => { let e = { search: $('#vsearch')[0], btn: $('#vbtn')[0], vzin: $('#vzin')[0], pagetitle: $('#pagetitle')[0], topleft: $('#topleft')[0], user: $('#vuser')[0], news: $('#vnews')[0], ipos: $('#ipos')[0], ipfz: $('#ipfz')[0], bgimg: $('#bgimg')[0], bgimgbing: $('#bgimg-bing')[0], bgimgnight: $('#bgimg-night')[0], bgendlessnight: $('#bg-endless-night')[0], logo: $('#vlogo')[0], cuslgurl: $('#cuslgurl')[0], lgtip: $('#lgtip')[0], lgtar: $('#lgtar')[0], lglinksto: $('#lglinksto')[0], thmcolor: [$('.thmcolor')[0], $('.thmcolor')[1]] //Ne triSay }; if (s) { // load e.search.checked = s.drawIptStyle; e.btn.checked = s.hideSearchBtn; e.vzin.checked = s.vzin; if (s.pageTiltle) e.pagetitle.value = s.pageTiltle; e.topleft.checked = s.topLeft; e.user.checked = s.userList; e.news.checked = s.hotNews; e.ipos.value = s.inputLenTillTop; e.ipfz.value = s.inputFontSize; e.bgimg.value = s.pageBackgroundImg; e.bgimg.disabled = s.pageBackgroundImgBing; e.bgimgbing.checked = s.pageBackgroundImgBing; e.bgimgnight.checked = s.pageBackgroundImgNight; e.bgendlessnight.checked = s.backgroundEndlessNight; e.bgimgnight.disabled = s.backgroundEndlessNight; e.logo.value = s.replaceLogo; e.cuslgurl.value = s.cusLogoUrl; e.lgtip.value = s.tipDeLogo; s.targetDeLogo ? e.lgtar.checked = true : $('#lgtars')[0].checked = true; e.lglinksto.value = s.logoLinksTo; e.thmcolor[0].value = s.thmColor[0]; e.thmcolor[1].value = s.thmColor[1]; if (s.replaceLogo == 666) e.cuslgurl.style.display = 'block' } else { // save return { drawIptStyle: e.search.checked, hideSearchBtn: e.btn.checked, vzin: e.vzin.checked, pageTiltle: e.pagetitle.value, topLeft: e.topleft.checked, userList: e.user.checked, hotNews: e.news.checked, inputLenTillTop: e.ipos.value, inputFontSize: e.ipfz.value, pageBackgroundImg: e.bgimg.value, pageBackgroundImgBing: e.bgimgbing.checked, pageBackgroundImgNight: e.bgendlessnight.checked ? true : e.bgimgnight.checked, backgroundEndlessNight: e.bgendlessnight.checked, replaceLogo: Number(e.logo.value), season: yourData.season, cusLogoUrl: e.cuslgurl.value, tipDeLogo: e.lgtip.value, targetDeLogo: e.lgtar.checked, logoLinksTo: e.lglinksto.value, thmColor: [e.thmcolor[0].value, e.thmcolor[1].value] } } }, watch: (s, a, f) => { $(s).on(a, f) }, cover: () => { world.draw(TRI_CSS_TEXT.night); if (yourData.drawIptStyle) world.draw('#head_wrapper #form .bdsug-new li,#head_wrapper #form .bdsug-new li b {color: #222 !important}'); if (yourData.vzin) world.log(lingvo.night) } }; //取得用户设定 //world.draw('body {opacity: 0}'); document.body.style.opacity = "0" var yourData = world.take(you, her); if (yourData.vzin) world.log(lingvo.vzin); world.update(); world.log(lingvo.welcome); let pageBackgroundImg = yourData.pageBackgroundImgNight ? '' : (yourData.pageBackgroundImgBing ? '' : (yourData.pageBackgroundImg == '' ? '' : 'background-image: url(' + yourData.pageBackgroundImg + ')')); //预置的必需样式 others tris // world.draw(`:root{--wallpaper: url(` + IMAGES[2] + `)}`); world.draw(TRI_CSS_TEXT.others); world.draw(TRI_CSS_TEXT.tris); if (yourData.pageTiltle) document.title = yourData.pageTiltle; let timeHour = new Date().getHours(), nightBegin = 7, nightOver = 18; if ((yourData.pageBackgroundImgNight && (timeHour <= nightBegin || timeHour >= nightOver)) || yourData.backgroundEndlessNight) { world.cover(); } else { if (yourData.pageBackgroundImgBing) { world.require({ method: "GET", url: API[1], onload: (b) => { let c = JSON.parse(b.responseText).images[0] let bing = 'https://www.bing.com' + c.url; world.draw('body{background-image:url(' + bing + ')}'); if (yourData.vzin) world.log(lingvo.bing + c.copyright + '\n\t' + bing) } }); }; if (yourData.pageBackgroundImgNight) { let night = world.repeat.engage(10, () => { timeHour = new Date().getHours(); if (timeHour <= nightBegin || timeHour >= nightOver) { world.cover(); world.repeat.execute(night) } }) }; } yourData.drawIptStyle ? world.draw(TRI_CSS_TEXT.sei) : world.draw(TRI_CSS_TEXT.seu); yourData.hideSearchBtn ? world.draw(`#head_wrapper .s_btn_wr {opacity: 0}`) : world.draw(`#head_wrapper .s_btn_wr,#head_wrapper .s_btn {opacity: 1}`); if (yourData.topLeft) world.draw(`.s-top-left{display: none}`); if (yourData.userList) { world.draw(`.s-top-right{display: none}`) } // else {world.draw(`.s-top-right .s-top-login-btn{display: none}`)} //应当不需要这个 if (yourData.hotNews) world.draw(`.s-hotsearch-wrapper,#m,#s_wrap {display: none}`); let a = world.repeat.engage(0.03, () => { document.body.style.opacity = (Number(document.body.style.opacity) + 0.1).toString() if (document.body.style.opacity == "1") world.repeat.execute(a) }) //elogo let lgs = yourData.replaceLogo; if (lgs) { let elogo = $("#s_lg_img")[0]; switch (lgs) { case -3: elogo.src = IMAGES[1]; break; case -2: elogo.style.opacity = "0"; break; case -1: elogo.style.display = "none"; //移除 break; case 1: case 233: elogo.src = SEASON_LOGO[yourData.season]; world.require({ method: "GET", url: API[0], onload: (r) => { let bili = JSON.parse(r.responseText).data[142][0].litpic.replace("http:", "https:"); if (lgs == 1) { if (~SEASON_LOGO.indexOf(bili)) { yourData.season = SEASON_LOGO.indexOf(bili); world.rise(you, yourData); }; elogo.src = SEASON_LOGO[yourData.season]; if (yourData.vzin) world.log(lingvo.season + SEASON_LOGO[yourData.season]); } else { elogo.src = bili; if (yourData.vzin) world.log(lingvo.bili + bili); }; } }); break; case 666: if (yourData.cusLogoUrl != "") elogo.src = yourData.cusLogoUrl; if (yourData.vzin) world.log(lingvo.custome + (yourData.cusLogoUrl == "" ? "地址为空" : yourData.cusLogoUrl)) break; }; } if (~lgs) { //-1 移除 无需替换 let mp = $("area")[0]; if (yourData.logoLinksTo != "") mp.href = yourData.logoLinksTo; mp.target = yourData.targetDeLogo ? "_blank" : "_self"; mp.title = yourData.tipDeLogo } let ct = document.createElement('div'); ct.innerHTML = TRI_HTML; try { document.body.appendChild(ct); $('.trimg')[0].src = IMAGES[2]; $('#tri-ell')[0].innerHTML = ` body {<span id="sbgimg">`+ pageBackgroundImg + `</span>} :root{ --ipt-len: <span id="iptlen">` + yourData.inputLenTillTop + `</span>; --ipt-fz: <span id="iptfz">` + yourData.inputFontSize + `</span>; --thm-fc: <span class="scolor">` + yourData.thmColor[0] + `</span>; --thm-fo: <span class="scolor">` + yourData.thmColor[1] + `</span> } `; $('#tri-styles')[0].innerHTML = ` body {`+ pageBackgroundImg + `} :root{ --ipt-len: ` + yourData.inputLenTillTop + `; --ipt-fz: ` + yourData.inputFontSize + `; --thm-fc: ` + yourData.thmColor[0] + `; --thm-fo: ` + yourData.thmColor[1] + ` } `; world.watch('#ipfz', 'input', () => { let ip = $('#ipfz')[0].value; let kw = $('#kw')[0]; if (kw.value.match(/^(字体大小\d+px)?$/)) kw.value = '字体大小' + ip + 'px'; $('#iptfz')[0].innerText = ip }); world.watch('#ipfz', 'focusout', () => { if ($('#kw')[0].value.match(/^字体大小\d+px$/)) $('#kw')[0].value = "" }); world.watch('.trilato', 'click', () => { // window.open(IMAGES[1]) world.rise(me, world.take(me, 0) + 1); switch (world.take(me)) { case 1: world.say(lingvo.tri[1], 1.5); world.wait(30, () => { world.execute(me); }) break; case 2: world.say(lingvo.tri[2], 2); break; case 3: world.say(lingvo.tri[3], 2.5); break; case 4: world.say(lingvo.tri[4], 3.5); break; case 5: world.say(lingvo.tri[5], 4) world.execute(you); world.execute(me); world.wait(8, () => { alert(lingvo.tri[0]); window.location.reload(); }) break; }; }); world.watch('.save-btn', 'click', () => { world.say(lingvo.save, 0.8); world.rise(you, world.savl(0)); world.wait(1.2, () => { window.location.reload() }) }); $('#kw')[0].autofocus = true; world.savl(yourData); world.execute(me); } catch (e) { console.log(e) } if (yourData.vzin) { console.log(world.savl(0)); console.timeEnd("星凰·众里寻她千百度\n\t本次耗时") } })();