Chrome 插件开发(二)- content.js与background.js之间互相通信
一、content向background发送消息 js content.js chrome.runtime.sendMessage(data, (response) ={ console.log(response) }); js background.js chrome.runtime.onMessage.addListener((message
一、content向background发送消息 js content.js chrome.runtime.sendMessage(data, (response) ={ console.log(response) }); js background.js chrome.runtime.onMessage.addListener((message
在background.js文件中使用 chrome.tabs.captureVisibleTab 就可以截取页面,[captureVisibleTab](https:developer.chrome.com/docs/extensions/reference/tabs/method-captureVisibleTab) 方式返回一个Promise; captureVi
M1芯片安装依赖的时候会报错: <--- JS stacktrace ---> FATAL ERROR: wasm code commit Allocation failed - process out of memory 1: 0x10431b740 node::Abort() [/Users/xxx/.nvm/versions/node/v14.16.0/bin/node] 2
nextjs有时需要直接导出跟后端没有数据交互的页面,直接在package.json中添加: json "export": "next build && next export" 然后执行 shell npm run export 就会在根目录下生成out文件夹,out目录下的就是生成的静态文件
网页标注实现文章收集: [https:mp.weixin.qq.com/s/PY3JGWAx-nVs7o5hys6ycg](https:mp.weixin.qq.com/s/PY3JGWAx-nVs7o5hys6ycg)
js <a href="skype:xxxx?chat" target="_blank" rel="noreferrer" > </a 更换用户名即可
js <a href="https:api.whatsapp.com/send?phone=+xxxx&text=Hello" target="_blank" rel="noreferrer" > </a 将其中的电话号码换了即可
antd upload 组件上传时有时会报如下错误 antd upload Provisional headers are shown 在请求头中添加如下代码 js 'X-Requested-With': null 表示使用传统的同步请求
动漫 1. 一人之下 2. 斗破苍穹 3. 不良人 4. 凡人修仙转 5. 君有云 6. 灵笼 7. 刺客伍六七 电影 1. 教父 2. 肖生克的救赎
经常在脚本编写中需要使用到模版tempalte,用来静态生成文件、代码,总结如下。 template中define使用 在使用编写template时可以使用{{define}}{{end}}来命名模版,在模版引入时直接使用命名即可,如下: header.tpl tpl {{define header}} header demo {{end}} article.tpl