chrome extensions & debug
chrome extensions & debug
debug background.js

debug popup.js

debug content_script.js


chrome.storage
chrome.storage.sync.getbug

// array OK
chrome.storage.sync.get([
"jira_str",
"jira_obj"
], function(items) {
console.log(`chrome.storage.sync.get OK!`);
console.log(`get items =`, JSON.stringify(items, null, 4));
});
// object Error
chrome.storage.sync.get({
jira_str,
jira_obj,
}, function(items) {
console.log(`chrome.storage.sync.get OK!`);
console.log(`get items =`, JSON.stringify(items, null, 4));
});
// chrome.storage.sync.get({
// "jira_str",
// "jira_obj",
// }, function(items) {
// console.log(`chrome.storage.sync.get OK!`);
// console.log(`get items =`, JSON.stringify(items, null, 4));
// });
API
https://developer.chrome.com/extensions/storage
https://developer.chrome.com/extensions/storage#using-sync
To store user data for your extension, you can use either
storage.sync, orstorage.local
// storage.sync
chrome.storage.sync.set({key: value}, function() {
console.log('Value is set to ' + value);
});
chrome.storage.sync.get(['key'], function(result) {
console.log('Value currently is ' + result.key);
});
// storage.local:
chrome.storage.local.set({key: value}, function() {
console.log('Value is set to ' + value);
});
chrome.storage.local.get(['key'], function(result) {
console.log('Value currently is ' + result.key);
});
https://stackoverflow.com/questions/14531102/saving-and-retrieving-from-chrome-storage-sync
https://stackoverflow.com/questions/22636771/chrome-storage-sync-vs-chrome-storage-local
https://bugs.chromium.org/p/chromium/issues/detail?id=161771
localStorage API
https://developer.mozilla.org/en/DOM/Storage#localStorage
zip
bash shell zip
# admin pwd
$ sudo apt install zip
$ zip -r chrome-jira.2018.12.18.zip chrome-jira/*

https://www.cnblogs.com/xgqfrms/p/9714161.html
official api docs
https://developer.chrome.com/extensions
https://developer.chrome.com/extensions/windows
https://developer.chrome.com/extensions/extension
https://developer.chrome.com/extensions/commands
https://developer.chrome.com/extensions/browserAction
https://developer.chrome.com/extensions/pageAction
https://developer.chrome.com/extensions/runtime
https://developer.chrome.com/extensions/runtime#property-lastError
https://developer.chrome.com/extensions/tabs
https://developer.chrome.com/extensions/system_storage
https://developer.chrome.com/extensions/system_memory
https://developer.chrome.com/extensions/system_cpu
https://developer.chrome.com/extensions/platformKeys
https://developer.chrome.com/extensions/omnibox
chrome extensions & debug的更多相关文章
- Jira & SVN & Chrome extensions
Jira & SVN & Chrome extensions Plugins SVN & Jira Plugins ok selector bug document.query ...
- 如何在Chrome下Debug Mocha的测试
简介 经过前两篇文章的介绍,相信读者对Mocha应该有一定的认知了,本文重点讲述如何在Chrome下Debug Mocha Test, 方便你在测试fail的时候troubleshooting. 关键 ...
- Best Chrome Extensions
Best Chrome Extensions chrome://extensions/ # ghelper chrome-extension://cieikaeocafmceoapfogpffaalk ...
- Chrome Extensions API & options
Chrome Extensions API options https://developer.chrome.com/extensions https://developer.chrome.com/e ...
- Do Chrome extensions access iframes? chrome扩展插件访问所有iframes
32down voteaccepted Yes, a Chrome Extension "content script" can run in all iframes (that ...
- chrome浏览器debug
Chrome浏览器审查元素 1.Elements标签页 Elements标签页的左侧就是对页面HTML结构的查看与编辑,你可以直接在某个元素上双击修改元素的属性. 1.Edit as HTML直接对元 ...
- chrome extensions notifications
developer.chrome.comhttps://developer.chrome.com/extensions/notifications notification | MDNhttps:// ...
- chrome dev debug network 的timeline说明
在使用chrome的时候F12的开发者工具中有个network,其中对每个请求有个timeline的说明,当鼠标放上去会有下面的显示: 这里面的几个指标在说明在chrome使用文档有说明: 下面我用人 ...
- chrome extensions
chrome web store AppsGamesExtensionsThemes CATEGORIES All FEATURESClear Runs Offline By ...
随机推荐
- linux (ubuntu)安装pycharm
1. 下载 http://www.jetbrains.com/pycharm/download/ 选择Linux Tab,选择下载免费的Community Edition. 2. 安装PyCharm ...
- 9、Java ConcurrentModificationException异常原因和解决方法
Java ConcurrentModificationException异常原因和解决方法 在前面一篇文章中提到,对Vector.ArrayList在迭代的时候如果同时对其进行修改就会抛出java.u ...
- Mac brew安装redis
1.安装redis $ brew install redis Error:Failed to download resource "reds" // 下载reds失败 不过不需要 ...
- spl_autoload_register()函数
一.__autoload 这是一个自动加载函数,在PHP5中,当我们实例化一个未定义的类时,就会触发此函数.看下面例子: printit.class.php <?php class PRINTI ...
- 你需要掌握的http知识
作为一名前端er,http是我们必须要掌握的,那么我们到底需要掌握哪些东西呢 一.基础知识 这里我们介绍与http相关的TCP.IP.DNS.url.uri 1.IP IP地址是我们很熟悉的东西,最常 ...
- 02-JVM内存模型:虚拟机栈与本地方法栈
一.虚拟机栈(VM Stack) 1.1)什么是虚拟机栈 虚拟机栈是用于描述java方法执行的内存模型. 每个java方法在执行时,会创建一个“栈帧(stack frame)”,栈帧的结构分为“局部变 ...
- django1.11+xadmin的搭建
1.git clone https://github.com/sshwsfc/xadmin.git或者直接下载zip包 2..在项目根目录下建一个extra_apps的包,将xadmin源码包存放在里 ...
- 【SpringCloud】第四篇:断路器(Hystrix)
前言: 必需学会SpringBoot基础知识 简介: spring cloud 为开发人员提供了快速构建分布式系统的一些工具,包括配置管理.服务发现.断路器.路由.微代理.事件总线.全局锁.决策竞选. ...
- Java enum类型笔记
用途: 定义命令行参数,菜单选项,星期,方向(东西南北)等 与普通类的不同 有默认的方法 value() 每个enum类都已默认继承java.lang.Enum,所以enum类不能继承其他类 构造方法 ...
- unity实现框选效果
思路: 在uinity中既可以将屏幕坐标转换为世界坐标,也可以将世界坐标转换为屏幕坐标.这样的话我们就可以通过判断物体在世界坐标转换为平幕坐标是否在鼠标框选的矩形区域坐标内,来判断物体是否在框选范围. ...