Bugfix: AJAX_TOKEN with document.currentScript

This commit is contained in:
DarkCat09 2023-07-04 14:46:26 +04:00
parent ea5be6d383
commit 4f65434628
3 changed files with 2 additions and 1 deletions

View file

@ -142,6 +142,7 @@ class Js2PyInterpreter(Interpreter):
window.encodeURIComponent = function(_s){ };
window.document = { };
document.doctype = { };
document.currentScript = { };
document.getElementById = function(_s){ };
''')

View file

@ -4,7 +4,6 @@
"requires": true,
"packages": {
"": {
"name": "data",
"dependencies": {
"vm2": "^3.9.13"
}

View file

@ -17,6 +17,7 @@ const vm = new VM({
document: {
getElementById: (_i) => {},
doctype: {},
currentScript: {},
},
},
})