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

Function addCopyButtonEvent1

Ping.Sx-Enhanced.user.js:59–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58 // 复制按钮点击事件
59 function addCopyButtonEvent1() {
60 let ip = new Array();
61 document.querySelectorAll('span.select-all > a[href]').forEach(function(_this) {ip.push(_this.innerText);})
62 if (ip.length > 0) {
63 if (GM_getValue('menu_separator')) {
64 GM_setClipboard(unique(ip).toString().replaceAll(',','\n'), 'text');
65 } else {
66 GM_setClipboard(unique(ip).toString(), 'text');
67 }
68 }
69 }
70 function addCopyButtonEvent2() {
71 let ip = new Array();
72 document.querySelectorAll('span.select-all > a[href]').forEach(function(_this) {

Callers

nothing calls this directly

Calls 1

uniqueFunction · 0.85

Tested by

no test coverage detected