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.encodeURIComponent = function(_s){ };
window.document = { }; window.document = { };
document.doctype = { }; document.doctype = { };
document.currentScript = { };
document.getElementById = function(_s){ }; document.getElementById = function(_s){ };
''') ''')

View file

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

View file

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