(event)
| 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; |
no test coverage detected