Update website
This commit is contained in:
parent
a0b0d3dae7
commit
ae7ef6ad45
3151 changed files with 566766 additions and 48 deletions
20
admin/phpMyAdmin/js/dist/transformations/json.js
vendored
Normal file
20
admin/phpMyAdmin/js/dist/transformations/json.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* JSON syntax highlighting transformation plugin
|
||||
*/
|
||||
AJAX.registerOnload('transformations/json.js', function () {
|
||||
var $elm = $('#page_content').find('code.json');
|
||||
$elm.each(function () {
|
||||
var $json = $(this);
|
||||
var $pre = $json.find('pre');
|
||||
/* We only care about visible elements to avoid double processing */
|
||||
|
||||
if ($pre.is(':visible')) {
|
||||
var $highlight = $('<div class="json-highlight cm-s-default"></div>');
|
||||
$json.append($highlight);
|
||||
CodeMirror.runMode($json.text(), 'application/json', $highlight[0]);
|
||||
$pre.hide();
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue