feat(scripts): improve background documentation

This commit is contained in:
wanhose 2021-06-27 13:17:03 +02:00
parent 235ccbc344
commit c86ff53fe8

View File

@ -79,7 +79,6 @@ const enablePopup = (tabId) => {
}; };
/** /**
* @async
* @function getCache * @function getCache
* @description Retrieves cache state * @description Retrieves cache state
* *
@ -88,7 +87,7 @@ const enablePopup = (tabId) => {
* @returns {Promise<{ enabled: boolean, matches: string[] }>} Cache state * @returns {Promise<{ enabled: boolean, matches: string[] }>} Cache state
*/ */
const getCache = async (hostname, responseCallback) => { const getCache = (hostname, responseCallback) => {
chrome.storage.local.get(null, (store) => { chrome.storage.local.get(null, (store) => {
try { try {
const cache = store[hostname]; const cache = store[hostname];
@ -104,7 +103,6 @@ const getCache = async (hostname, responseCallback) => {
}; };
/** /**
* @async
* @function getTab * @function getTab
* @description Retrieves current tab information * @description Retrieves current tab information
* *
@ -146,7 +144,6 @@ const getList = async (responseCallback) => {
}; };
/** /**
* @async
* @function updateCache * @function updateCache
* @description Update cache state * @description Update cache state
* *
@ -154,7 +151,7 @@ const getList = async (responseCallback) => {
* @param {object} [state] * @param {object} [state]
*/ */
const updateCache = async (hostname, state) => { const updateCache = (hostname, state) => {
chrome.storage.local.get(null, (cache) => { chrome.storage.local.get(null, (cache) => {
const current = cache[hostname]; const current = cache[hostname];