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. Canvas在移动端设备上模糊出现锯齿边

    在绘制的过程中画布内容的实际大小是根据 canvas 的 width 与 height 属性设置的,而 style 或者CSS设置的width 与 height 只是简单的对画布进行缩放. canva ...

  2. Caliburn.Micro 杰的入门教程1(翻译)

    Caliburn.Micro 杰的入门教程1(原创翻译)Caliburn.Micro 杰的入门教程2 ,了解Data Binding 和 Events(翻译)Caliburn.Micro 杰的入门教程 ...

  3. MySql——查看数据库性能基本参数

    使用show status可以查看数据库性能的参数,基本语法:show status like 'value'; 例如: show status like 'Connections';/*连接mysq ...

  4. #386. 【UNR #3】鸽子固定器

    #386. [UNR #3]鸽子固定器 题目链接 官方题解 分析: 神奇的做法+链表. 首先按照大小排序. 对于小于选择小于m个物品的时候,这个m个物品一定是一段连续的区间.因为,如果中间空着一个物品 ...

  5. Redis系列七 主从复制(Master/Slave)

    主从复制(Master/Slave) 1.是什么 也就是我们所说的主从复制,主机数据更新后根据配置和策略,自动同步到备机的master/slaver机制,Master以写为主,Slave以读为主. 2 ...

  6. 卷积神经网络CNN在自然语言处理中的应用

    卷积神经网络(Convolution Neural Network, CNN)在数字图像处理领域取得了巨大的成功,从而掀起了深度学习在自然语言处理领域(Natural Language Process ...

  7. 使用vs code写php及调试

    原文来自:http://www.cnblogs.com/CLR010/p/5276077.html 首页先改下php.ini 一般是在最底部,有就修改没有就加上去下面的配置: xdebug.remot ...

  8. unity share current game screen

    using UnityEngine; using System.Collections; using UnityEngine.UI; using System.IO; public class Tak ...

  9. JavaWeb——JavaWeb开发入门

    一.基本概念 1.1.WEB开发的相关知识 WEB,在英语中web即表示网页的意思,它用于表示Internet主机上供外界访问的资源. Internet上供外界访问的Web资源分为: 静态web资源( ...

  10. 腾讯云API弹性公网IP踩坑

    由于自己管理的云服务器数量比较多,时不时需要更换IP,在管理台上一下下点击,实在浪费时间,于是就想到了通过API调用的方式,将更换IP一系列动作,全部集成到Python代码里面,实现一行命令,完成IP ...