MCPcopy Create free account
hub / github.com/XIU2/UserScript / replyCustom_0

Function replyCustom_0

Hostloc-Enhanced.user.js:365–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363 break;
364 }
365 function replyCustom_0() {
366 let vfastpost = e => {
367 if (e.target.nodeType == 1 && e.target.innerHTML && e.target.innerHTML.indexOf('id="vfastpost"') > -1) {
368 let message = e.target.querySelector('input[name="message"]'), id = message.id.match(/\d+/g)[0];
369 message.parentNode.innerHTML = `<textarea type="text" name="message" id="vmessage_${id}" style="width: 99.8%;height: 30px;border: none;outline: none;font-size: 14px;overflow-y: hidden;"></textarea>`
370 document.getElementById(`vreplysubmit_${id}`).onclick = function () {
371 if (GM_getValue('menu_customLittleTail')) document.getElementById(`vmessage_${id}`).value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n');
372 }
373 }
374 }
375 document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件
376 }
377 function replyCustom_1() {
378 let floatlayout_reply = e => {
379 if (e.target.nodeType == 1 && e.target.innerHTML && e.target.innerHTML.indexOf('id="floatlayout_reply"') > -1) {

Callers 1

replyCustomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected