webextlib
v0.1.2
Published
* webextlib is a NodeJS module that encapsulates the Chrome and Firefox extension API interfaces * webextlib是一个封装了Chrome和Firefox扩展API接口的NodeJS模块
Downloads
13
Maintainers
Readme
What is webextlib? 什么是webextlib?
- webextlib is a NodeJS module that encapsulates the Chrome and Firefox extension API interfaces
- webextlib是一个封装了Chrome和Firefox扩展API接口的NodeJS模块
Install 安装
npm i -S webextlib
Upgrade Instructions 升级说明
0.1.2
- Fixed the issue of the sendMessageToBackgroundOrPopup method being invalid.
- 修复了sendMessageToBackgroundOrPopup方法无效的问题。
0.1.1
- Fixed import error.
- 修复了import导入报错的问题。
0.1.0
- Added usage instructions.
- 添加了使用说明。
Usage 使用
import {manifestInfo, extensionId, onSelfInstalled, onBrowserStartup, onMessage, onBeforeRequest, createNewAlarm, onAlarm, getExtensionFileUrl, openSettingPage, openSelfPage, getCurrentActiveTabInfo, queryAllTabs, setTabActiveById, createNewTab, getI18nText, storageSet, storageGet, setIconTitle, setIconBadgeText, setIconBadgeTextColor, setIconBadgeBackgroundColor, removeBrowserData} from 'webextlib';
// background.js
onSelfInstalled
.then(() => {
openSettingPage();
});