通过chrome扩展打开网页
12345678910111213141516171819202122232425262728293031function Background () { chrome.runtime.onInstalled.addListener(function (details) { // only run the following section on install if (details.reason !== "install") { return; } chrome.tabs.create({ url: "https://webdesktop.net" }); });};var background = new Background();chrome.omnibox.onInputEntered.addListener(function ...
禁用浏览器调试工具脚本
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374/** * Created by OXOYO on 2018/11/9. * * 禁用调试工具 */const closeWindow = (loop) => { clearInterval(loop) // 关闭当前窗口 window.close() // 将当前窗口跳转置空白页 window.location = 'about:blank' console.clear()}export default { init: function () { window.onkeydown = window.onkeyup = window.onkeypress = function (event) { /...
npm install chromedriver 失败解决办法
解决办法12// 切换chromedriver包cdn源npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver 错误信息12345678910111213141516171819> chromedriver@2.33.2 install E:\Webstorm_WorkSpace\X-Admin\node_modules\chromedriver> node install.jsDownloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_win32.zipSaving to C:\Users\ADMINI~1\AppData\Local\Temp\chromedriver\chromedriver_win32.zipChromeDriver installation failed Error with http(s) request: Error: g...
关于 windows 下 node_modules\node-sass\vendor 的报错解决方法
关于 windows 下 node_modules\node-sass\vendor 的报错解决方法 在windows下开发项目时,当项目中用到node-sass时,经常会遇到如下错误: 1234ERROR in ENOENT: no such file or directory, scandir 'D:\WebstormProjects\myProject\node_modules\node-sass\vendor' @ ./~/myProject/src/styles/main.scss 4:14-251 13:2-17:4 14:20-257 问题原因:windows 下 node-sass 编译没通过,导致 node-sass\vendor\win32-x64-51 目录下缺少 binding.node 文件,实际上连 vendor\win32-x64-51 目录也没有。 解决办法:方法一、执行如下命令,从新编译 node-sass 即可。 1npm rebuild node-sass 方法二、 从 https://github.com/sas...
Weinre 远程调试工具安装&使用
Weinre 远程调试工具安装&使用 安装方法1. 首先需要安装node 2. npm -g install weinre //安装weinre 如果在线安装不了可以使用离线安装包(npm install filePath //本地路径) 启动weinre --boundHost [hostname | ip address |-all-] --httpPort [port] //启动weinre eg. weinre --boundHost 172.16.8.20 --httpPort 8090 注意:host需要配成ip,不要使用localhost(除非只会在自己的PC机器上进行调试) 相关教程node 官网:http://nodejs.org/ 教程:https://github.com/alsotang/node-lessons npm用法及离线安装方法:http://www.tuicool.com/articles/eE7zam nrm —— 快速切换 NPM 源:http://segmentfault.com/a/119000000047...
前端工程师知识点
前端工程师知识点
package.json ~ ^ 等符号解读
See semver for more details about specifying version ranges. 1234567891011121314151617version Must match version exactly>version Must be greater than version>=version etc<version<=version~version "Approximately equivalent to version" See semver^version "Compatible with version" See semver1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0http://... See 'URLs as Dependencies' below* Matches any version"" (just an empty string) Same as *version1 - version...
Webpack 入门视频
Webpack 入门视频 链接:http://pan.baidu.com/s/1o7LsR8Y 密码:fhqp
Emmet-Documentation
Emmet 命令