Greasemonkey: Escape jinja variables for JS strings.
This commit is contained in:
parent
a7f41b4564
commit
d93c583c0d
@ -1,5 +1,5 @@
|
|||||||
(function () {
|
(function () {
|
||||||
var _qute_script_id = "__gm_{{ scriptName }}";
|
var _qute_script_id = "__gm_"+{{ scriptName | tojson }};
|
||||||
|
|
||||||
function GM_log(text) {
|
function GM_log(text) {
|
||||||
console.log(text);
|
console.log(text);
|
||||||
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
var GM_info = (function () {
|
var GM_info = (function () {
|
||||||
return {
|
return {
|
||||||
'script': {{ scriptInfo }},
|
'script': {{ scriptInfo | tojson }},
|
||||||
'scriptMetaStr': {{ scriptMeta }},
|
'scriptMetaStr': {{ scriptMeta | tojson }},
|
||||||
'scriptWillUpdate': false,
|
'scriptWillUpdate': false,
|
||||||
'version': '0.0.1',
|
'version': '0.0.1',
|
||||||
'scriptHandler': 'Tampermonkey' // so scripts don't expect exportFunction
|
'scriptHandler': 'Tampermonkey' // so scripts don't expect exportFunction
|
||||||
|
Loading…
Reference in New Issue
Block a user