logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

js代码 RGBA颜色格式转换为16进制格式 javascript

function hexify(color) {var values = color.replace(/rgba?\(/, '').replace(/\)/, '').replace(/[\s+]/g, '').split(',');var a = parseFloat(values[3] || 1),r = Math.floor(a * parseInt(values[0]) + (1 - a)

#javascript
nodejs 爬虫中文字体乱码 superagent iconvLite

nodejs 对于编码格式为 gb2313的网页无法正确解析,有两个解决办法,欢迎补充。1 使用 superagent-charset 插件其实 superagent-charset插件也用到了iconvLiteconst superagent = require('superagent');const charset = require('superagent-charset');charset

#node.js
chrome扩展(插件)开发(四)content_script,background,popup,injected-script之间的消息通信通知以及数据传递

chrome 插件之消息通知 自有api和sessionStorage还有自定义事件chrome扩展之加载外部js到原网页中 1使用jquery的loadJs()2 使用chrome.extension.getURL

#javascript#vue.js#html5 +1
chrome扩展(插件)开发(三)被content_script注入的js使用和限制

chrome 插件之消息通知 自有api和sessionStorage还有自定义事件chrome扩展之加载外部js到原网页中 1使用jquery的loadJs()2 使用chrome.extension.getURL

#chrome#chrome devtools#javascript +1
chrome扩展(插件)开发(三)被content_script注入的js使用和限制

chrome 插件之消息通知 自有api和sessionStorage还有自定义事件chrome扩展之加载外部js到原网页中 1使用jquery的loadJs()2 使用chrome.extension.getURL

#chrome#chrome devtools#javascript +1
外部 js 调用vue里面的方法或者变量

vue 方法mounted () {window.testFun = this.testFun;// 方法赋值给window},methods: {// vue内部方法testFun () {},}外部js调用<script>function test() {testFun();// 直接通过window方法去调用methods中对应方法}</script>...

#vue.js#html5#javascript
chrome扩展(插件)开发(五)监听网页的ajax请求

1 chrome 自有api2; (function () {function ajaxEventTrigger(event) {var ajaxEvent = new CustomEvent(event, { detail: this });window.dispatchEvent(ajaxEvent);}var oldXHR = window.XMLHttpRequest;function n

#javascript
到底了