I'm looking for modify a javascript game with an userscript.
The problem is that all the game code is wrapped with a anonymous function like this
(function () { "use strict";
var js = 'test';
})();
Run Code Online (Sandbox Code Playgroud)
Can I have access to a JS variable with my userscript?
Edit :
See also : How to alter this javascript with Greasemonkey?
This question is not the same as Is it possible to gain access to the closure of a function? !
我使用乙烯基 ftp 在远程服务器上部署我的项目。上传文件没问题,但我还想删除本地文件夹中不再存在的文件。
例子 :
本地文件夹
./
fileA
fileB
fileC
Run Code Online (Sandbox Code Playgroud)
远程文件夹:
./
fileB
fileC
fileD
Run Code Online (Sandbox Code Playgroud)
部署后我在远程文件夹中的内容:
./
fileA
fileB
fileC
fileD
Run Code Online (Sandbox Code Playgroud)
我想要什么(与本地文件夹完全相同):
./
fileA
fileB
fileC
Run Code Online (Sandbox Code Playgroud)
我可以使用 rmdir 删除所有文件,但这意味着为每个部署重新上传所有文件。
谢谢