chrome extensions & debug

debug background.js

debug popup.js

debug content_script.js

chrome.storage

chrome.storage.sync.get bug


// 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, or storage.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的更多相关文章

  1. Jira & SVN & Chrome extensions

    Jira & SVN & Chrome extensions Plugins SVN & Jira Plugins ok selector bug document.query ...

  2. 如何在Chrome下Debug Mocha的测试

    简介 经过前两篇文章的介绍,相信读者对Mocha应该有一定的认知了,本文重点讲述如何在Chrome下Debug Mocha Test, 方便你在测试fail的时候troubleshooting. 关键 ...

  3. Best Chrome Extensions

    Best Chrome Extensions chrome://extensions/ # ghelper chrome-extension://cieikaeocafmceoapfogpffaalk ...

  4. Chrome Extensions API & options

    Chrome Extensions API options https://developer.chrome.com/extensions https://developer.chrome.com/e ...

  5. Do Chrome extensions access iframes? chrome扩展插件访问所有iframes

    32down voteaccepted Yes, a Chrome Extension "content script" can run in all iframes (that ...

  6. chrome浏览器debug

    Chrome浏览器审查元素 1.Elements标签页 Elements标签页的左侧就是对页面HTML结构的查看与编辑,你可以直接在某个元素上双击修改元素的属性. 1.Edit as HTML直接对元 ...

  7. chrome extensions notifications

    developer.chrome.comhttps://developer.chrome.com/extensions/notifications notification | MDNhttps:// ...

  8. chrome dev debug network 的timeline说明

    在使用chrome的时候F12的开发者工具中有个network,其中对每个请求有个timeline的说明,当鼠标放上去会有下面的显示: 这里面的几个指标在说明在chrome使用文档有说明: 下面我用人 ...

  9. chrome extensions

        chrome web store   AppsGamesExtensionsThemes   CATEGORIES   All FEATURESClear   Runs Offline By ...

随机推荐

  1. 位域 (Bit field)

    最近开始看编程之美这本书,里面有一道关于中国象棋将帅位置的简单问题,如下图所示,写一个程序输出将.帅的合法位置. 分析与解法 问题的本身并不复杂,只要把所有A.B 互相排斥的条件列举出来就可以完成本题 ...

  2. PHP.50-TP框架商城应用实例-前台2-商品推荐

    商品推荐 {抢购,新品,精品,热卖}效果如下 1.在商品表增加促销价格与促销起始时间和结束时间三个字段,字段推荐楼层与排序在后面用到  注意:在增加datetime类型字段时,要添加默认值{datet ...

  3. ATextAppearance.AppCompat.Small not found

    今天编译的代码的时候,刚才还是好的,后来吃个饭回来,就不行了. 报错如下: AGPBI: {"kind":"error","text":&q ...

  4. clr via c#读书笔记四:call、callvirt

    1.嵌套类,就是定义在类中的类:嵌套类可以访问外部类的方法.属性.字段而不管访问修饰符的限制,但是外部类只能够访问修饰符为public.internal的嵌套类的字段.方法.属性: 2.CLR如何调用 ...

  5. HTML5 离线应用程序

    离线Web应用:当客户端本地与Web应用程序的服务器没有建立连接时,也能正常在客户端本地使用该Web应用. Web应用程序的本地缓存与浏览器的网页缓存的区别 1. 本地缓存为整个Web应用程序服务,网 ...

  6. Servlet的5种方式实现表单提交(注册小功能)

    Servlet的5种方式实现表单提交(注册小功能),后台获取表单数据   用servlet实现一个注册的小功能 ,后台获取数据. 注册页面: 注册页面代码 : <!DOCTYPE html> ...

  7. 分享开源的GB/T-2260国家行政区划代码

    项目中需要用到省市数据,在网上搜了一下,很多旧数据,稍微新一点的下载就要积分.X币什么的,很不爽,最后在GitHub上找到一个开源的,还有各种语言版本的,非常方便! https://github.co ...

  8. 容器云技术:容器化微服务,Istio占C位出道

    在精彩的软件容器世界中,当新项目涌现并解决你认为早已解决的问题时,这感觉就像地面在你的脚下不断地移动.在许多情况下,这些问题很久以前被解决,但现在的云原生架构正在推动着更大规模的应用程序部署,这就需要 ...

  9. 2019年猪年海报PSD模板-第二部分

    14套精美猪年海报,免费猪年海报,下载地址:百度网盘,https://pan.baidu.com/s/1sH0U5oU-LQlaxnaWxPCrrg              

  10. tpo-10 C1 How to get photographs exhibited

    第 1 段 1.Listen to a conversation between a student and her Photography professor. 听一段学生和摄影学教授的对话. 第 ...