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

Function _initElements

apps/json-format/format-lib.js:260–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258 };
259
260 let _initElements = function () {
261
262 jfContent = $('#jfContent');
263 if (!jfContent[0]) {
264 jfContent = $('<div id="jfContent" />').appendTo('body');
265 }
266
267 jfPre = $('#jfContent_pre');
268 if (!jfPre[0]) {
269 jfPre = $('<pre id="jfContent_pre" />').appendTo('body');
270 }
271
272 jfStyleEl = $('#jfStyleEl');
273 if (!jfStyleEl[0]) {
274 jfStyleEl = $('<style id="jfStyleEl" />').appendTo('head');
275 }
276
277 formattingMsg = $('#formattingMsg');
278 if (!formattingMsg[0]) {
279 formattingMsg = $('<div id="formattingMsg"><span class="x-loading"></span>格式化中...</div>').appendTo('body');
280 }
281
282 _bindPrettyJsonShortcuts();
283
284 try {
285 jfContent.html('').show();
286 jfPre.html('').hide();
287 jfStatusBar && jfStatusBar.hide();
288 formattingMsg.hide();
289 } catch (e) {
290 }
291 };
292
293 /**
294 * HTML特殊字符格式化

Callers 2

formatFunction · 0.85
formatSyncFunction · 0.85

Calls 4

_bindPrettyJsonShortcutsFunction · 0.85
showMethod · 0.80
hideMethod · 0.80
$Function · 0.50

Tested by

no test coverage detected