미디어위키:Gadget-MetadataEditor.js 문서 원본 보기
보이기
문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
문서의 원본을 보거나 복사할 수 있습니다.
function LoadJSONEditor() {
if (document.getElementsByClassName("jsoneditor-container").length === 0) return;
var targetJSON = "https://dev.libertygame.work/index.php/RPG_in_City/game.json?action=raw";
mw.loader.getScript("https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js").then(function() {
fetch("https://dev.libertygame.work/index.php/%EB%A6%AC%EB%B2%84%ED%8B%B0%EA%B2%8C%EC%9E%84:%EA%B2%8C%EC%9E%84_%EB%A9%94%ED%83%80%EB%8D%B0%EC%9D%B4%ED%84%B0/%EC%8A%A4%ED%82%A4%EB%A7%88.json?action=raw")
.then(function(result){return result.json(); })
.then(function (result) {
const jsonEditorContainer = document.querySelector('.json-editor-container');
const editorvalue = document.querySelector('#value');
var schema = result;
fetch(targetJSON).then(function(result){return result.json(); }).then(function (response) {
const editor = new JSONEditor(jsonEditorContainer, {
mode: 'tree',
schema: schema,
theme: 'tailwind',
iconlib: 'openiconic',
keep_oneof_values: false,
disable_edit_json: true,
startval: response
}, response);
000
1:0
미디어위키:Gadget-MetadataEditor.js 문서로 돌아갑니다.