小编A. *_*hny的帖子

Can I have access to anonymous function variables in a userscript?

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? !

javascript anonymous-function userscripts

5
推荐指数
1
解决办法
1188
查看次数

Gulpvinyl ftp - 删除本地删除的文件

我使用乙烯基 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 删除所有文件,但这意味着为每个部署重新上传所有文件。

谢谢

ftp gulp vinyl

5
推荐指数
1
解决办法
1227
查看次数

标签 统计

anonymous-function ×1

ftp ×1

gulp ×1

javascript ×1

userscripts ×1

vinyl ×1