1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| var leonus = { linkCom: e => { var t = document.querySelector(".el-textarea__inner"); "bf" == e ? (t.value = "```yml\n", t.value += "- name: \n link: \n avatar: \n descr: \n siteshot: ", t.value += "\n```", t.setSelectionRange(15, 15)) : (t.value = "站点名称:\n站点地址:\n头像链接:\n站点描述:\n站点截图:", t.setSelectionRange(5, 5)), t.focus() }, owoBig: () => { if (!document.getElementById("post-comment") || document.body.clientWidth < 768) return; let e = 1, t = "", o = document.createElement("div"), n = document.querySelector("body"); o.id = "owo-big", n.appendChild(o), new MutationObserver((l => { for (let a = 0; a < l.length; a++) { let i = l[a].addedNodes, s = ""; if (2 == i.length && "OwO-body" == i[1].className) s = i[1]; else { if (1 != i.length || "tk-comment" != i[0].className) continue; s = i[0] } s.onmouseover = l => { e && ("OwO-body" == s.className && "IMG" == l.target.tagName || "tk-owo-emotion" == l.target.className) && (e = 0, t = setTimeout((() => { let e = 3 * l.path[0].clientHeight, t = 3 * l.path[0].clientWidth, a = l.x - l.offsetX - (t - l.path[0].clientWidth) / 2, i = l.y - l.offsetY; a + t > n.clientWidth && (a -= a + t - n.clientWidth + 10), a < 0 && (a = 10), o.style.cssText = `display:flex; height:${e}px; width:${t}px; left:${a}px; top:${i}px;`, o.innerHTML = `<img src="${l.target.src}">` }), 300)) }, s.onmouseout = () => { o.style.display = "none", e = 1, clearTimeout(t) } } })).observe(document.getElementById("post-comment"), { subtree: !0, childList: !0 }) }, };
|