草庐IT

想不到

全部标签

javascript - 为什么 greasemonkey 检测不到 facebook 中的某些页面更改?

我试图在facebook中对/messages页面执行user.js,但当导航从/更改为/messages时,greasemonkey似乎没有注意到。它也发生在其他内部页面中。一开始我以为是AJAX导航引起的,但是URL变了(不是hash部分),所以是正常导航吧?这是我用过的测试页://==UserScript==//@nameTest//@namespacenone//@descriptionjustanalertwhenpagechanges//@includehttp*://www.facebook.com/*//==/UserScript==alert(location.hre

javascript - 为什么eslint检测不到目录下的所有文件,却能检测到单个文件?

这是我的目录结构。我想配置一些eslint规则来检测我的代码。在.eslintrc中,我写了这些配置项。{"extends":"airbnb","rules":{"valid-jsdoc":2,//DisableuntilFlowsupportsletandconst"no-var":0,"react/jsx-uses-react":1,"react/jsx-no-undef":2,"react/wrap-multilines":2,"func-names":0,"new-cap":0,"no-undef":0,},"plugins":["react"]}我已经使用npm脚本来运行es

javascript - 尝试使用@别名时,Jest 找不到@babel/code-frame

我们的应用程序使用importES2015风格语法导入文件,利用Webpack4.6.0对ES2015模块的原生支持。我们还使用别名来缩短我们的相对文件路径。Webpack.conf.jsresolve:{extensions:['.js','.json','.less'],alias:{'@':resolve('public/js'),'handlebars':'handlebars/dist/handlebars.js',},modules:['less','node_modules']},example.jsimportwidgetfrom'@/widgets/widget';文

javascript - CasperJS 找不到变量 $

我试图在我的测试中注入(inject)jQuery,但出现以下错误:ReferenceError:找不到变量:$这是我正在尝试测试的ruby​​onrails应用程序,在WEBrick上运行。这是所有代码:varcasper=require('casper').create({clientScripts:['jquery-1.9.1.min.js']});//makesurepageloadscasper.start('http://127.0.0.1:3000',function(){this.test.assertTitle('EZpub','EZpubnotloaded');})

javascript - Node.js,获取找不到模块 'ws'错误

我已经在我的Windows-7PC上安装了node.js。我无法创建到远程服务器的websocket连接。我试图在我的脚本中加载模块“ws”:varWebSocket=require('ws')它给出了一个错误:cannotfindmodule'ws'所以我按照这里的说明进行操作:node.jswebsocketmoduleinstalledbutwon'tworkinscriptsExecutecmdasAdministrator(Rightclickcmdicon->RunasAdministrator)Thentypeincmd:c:\NodeInstalationDir\>np

javascript - Yeti 问题 - 找不到模块 'jade'

我刚刚安装了Yeti来自Yahoo,但是当我转到http://localhost:8000/时,我得到了这个:Error:Cannotfindmodule'jade'atloadModule(node.js:289:15)atrequire(node.js:420:14)atServerResponse.render(/usr/local/lib/node/.npm/yeti/0.1.0/dependencies/express/view.js:258:46)atObject.(/usr/local/lib/node/.npm/yeti/0.1.0/package/lib/server

javascript - 为什么我在 WebSocket 握手请求 header 中看不到 cookie 值?

我想从html页面发送一个websocket握手请求并编写如下代码:document.cookie="guestId=xxxx;remember=xxxxxx;";varws=newWebSocket("ws://localhost:5000/ws");但是ChromeDevTools中显示的内容似乎没有发送cookie:General:RequestURL:ws://localhost:5000/wsRequestMethod:GETStatusCode:307TemporaryRedirectResponseHeadersContent-Length:59Content-Type:

javascript - 找不到兼容版本 : babel-plugin-transform-decorators@^6. 13.0

很明显,当我运行npminstall时,突然出现以下错误:npmERR!Nocompatibleversionfound:babel-plugin-transform-decorators@^6.13.0npmERR!Validinstalltargets:npmERR!6.8.0,6.6.5,6.6.4,6.6.0,6.5.0,6.5.0-1,6.4.0,6.3.13,6.2.4,6.1.18,6.1.17,6.1.10,6.1.5,6.1.4,6.0.14,6.0.2我在package.json中有以下依赖项。我已经尝试将babel包更新到最新版本,以及安装babel-plugin

javascript - 我如何测试查看我网站的用户是否看不到某些内容,以及如何确保我的测试有效?

我正在使用类似于以下的代码:varimage=newImage();image.src="http://youtube.com/favicon.ico";image.onload=function(){//Theusercanaccessyoutube};image.onerror=function(){//Theusercan'taccessyoutube};我在这里找到的:DetectingifYouTubeisblockedbycompany/ISP测试用户是否可以访问youtube/facebook/twiter,所以当我尝试嵌入视频或类似按钮时。我知道用户是否可以看到它。在我

javascript - 尝试运行 node.js 样板项目时找不到模块 'Socket.IO-node'

当我尝试运行使用node.js样板项目创建的项目时出现错误我已经使用NPM通过以下命令安装了socket.io:npm安装socket.io我得到的错误是:node.js:189throwe;//process.nextTickerror,or'error'eventonfirsttick^Error:Cannotfindmodule'Socket.io-node'atFunction._resolveFilename(module.js:317:11)atFunction._load(module.js:262:25)atrequire(module.js:346:19)atObje