MCPcopy
hub / github.com/zxlie/FeHelper / copyInlineAiResult

Function copyInlineAiResult

apps/aiagent/fh.ai-inline.js:403–421  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

401}
402
403async function copyInlineAiResult(state) {
404 const text = state && state.result ? state.result : '';
405 if (!text) return false;
406 if (navigator.clipboard && navigator.clipboard.writeText) {
407 await navigator.clipboard.writeText(text);
408 state.statusText = '已复制 AI 结果';
409 return true;
410 }
411 const input = document.createElement('textarea');
412 input.value = text;
413 input.style.position = 'fixed';
414 input.style.opacity = '0';
415 document.body.appendChild(input);
416 input.select();
417 const ok = document.execCommand('Copy');
418 document.body.removeChild(input);
419 state.statusText = ok ? '已复制 AI 结果' : '复制失败';
420 return ok;
421}
422
423function getInlineAiTaskFromUrl() {
424 try {

Callers 5

copyAiResultFunction · 0.90
index.jsFile · 0.90
index.jsFile · 0.90
copyAiResultFunction · 0.90
copyAiResultFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected