diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index f450b88a9..a3196208d 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -531,7 +531,9 @@ function validateConstantFn(trusted, raw, extraArgs = {}) { if ( isNaN(raw) ) { return; } if ( Math.abs(raw) > 0x7FFF ) { return; } } else if ( trusted ) { - if ( raw.startsWith('{') && raw.endsWith('}') ) { + if ( raw.startsWith('json:') ) { + try { value = safe.JSON_parse(raw.slice(5)); } catch(ex) { return; } + } else if ( raw.startsWith('{') && raw.endsWith('}') ) { try { value = safe.JSON_parse(raw).value; } catch(ex) { return; } } } else {