MCPcopy Index your code
hub / github.com/zxlie/FeHelper / _copyPrettyJsonSelection

Function _copyPrettyJsonSelection

apps/json-format/format-lib.js:197–207  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

195 };
196
197 let _copyPrettyJsonSelection = function (event) {
198 if (!prettyJsonSelectionActive || !_hasPrettyJsonResult()) return false;
199 if (event && event.clipboardData && event.clipboardData.setData) {
200 event.preventDefault();
201 event.clipboardData.setData('text/plain', cachedJsonString);
202 toast('格式化后的 JSON 全文已复制到剪贴板!');
203 return true;
204 }
205 _copyToClipboard(cachedJsonString, '格式化后的 JSON 全文已复制到剪贴板!');
206 return true;
207 };
208
209 let _bindPrettyJsonShortcuts = function () {
210 if (prettyJsonShortcutBound || !document.addEventListener) return;

Callers 1

_bindPrettyJsonShortcutsFunction · 0.85

Calls 3

_hasPrettyJsonResultFunction · 0.85
_copyToClipboardFunction · 0.70
toastFunction · 0.50

Tested by

no test coverage detected