All Projects → sentialx → Electron Extensions

sentialx / Electron Extensions

Licence: other
Implementation of Chrome extension APIs for Electron

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Electron Extensions

Extension Create
Create modern cross-browser extensions with no build configuration.
Stars: ✭ 167 (+16.78%)
Mutual labels:  extensions, chrome
Flaresolverr
Proxy server to bypass Cloudflare protection
Stars: ✭ 241 (+68.53%)
Mutual labels:  api, chrome
Circle
让网页赏心悦目、让阅读回归初心。Circle 阅读模式提供更隐私、更轻松、更舒适的网页阅读体验
Stars: ✭ 158 (+10.49%)
Mutual labels:  extensions, chrome
Extensions
Source code of Raindrop.io browser extension (Chrome, Firefox, Opera)
Stars: ✭ 446 (+211.89%)
Mutual labels:  extensions, chrome
Github Extended
A Chrome extension to discover more repositories
Stars: ✭ 29 (-79.72%)
Mutual labels:  extensions, chrome
Sillynium
Automate the creation of Python Selenium Scripts by drawing coloured boxes on webpage elements
Stars: ✭ 100 (-30.07%)
Mutual labels:  extensions, chrome
Api
API that uncovers the technologies used on websites and generates thumbnail from screenshot of website
Stars: ✭ 189 (+32.17%)
Mutual labels:  api, chrome
Oscnews
Chrome 插件,查看开源中国软件更新资讯,文档导航,GitHub 趋势榜,linux命令索引,浏览历史记录和时钟页面。
Stars: ✭ 582 (+306.99%)
Mutual labels:  extensions, chrome
Scscmsmusic
这是一个chrome扩展程序的音乐播放器,方便在没有安装音乐播放器时使用chrome浏览器听歌。可以建立播放列表,导入的歌曲可以存储,并支持播放远程音乐。
Stars: ✭ 26 (-81.82%)
Mutual labels:  extensions, chrome
Canclearad
一款全自动清除网站广告的Chrome插件,支持通用广告,如百度推广或淘宝天猫等广告;也支持特定网站的广告清除。
Stars: ✭ 65 (-54.55%)
Mutual labels:  extensions, chrome
Scratchaddons
All-in-one browser extension for Scratch.
Stars: ✭ 133 (-6.99%)
Mutual labels:  extensions, chrome
Smoke
💨 Simple yet powerful file-based mock server with recording abilities
Stars: ✭ 142 (-0.7%)
Mutual labels:  api
Archiveis
A simple Python wrapper for the archive.is capturing service
Stars: ✭ 140 (-2.1%)
Mutual labels:  api
Asar
Simple extensive tar-like archive format with indexing
Stars: ✭ 1,884 (+1217.48%)
Mutual labels:  chrome
Notion Enhancer
an enhancer/customiser for the all-in-one productivity workspace notion.so (app)
Stars: ✭ 3,114 (+2077.62%)
Mutual labels:  extensions
Thehive4py
Python API Client for TheHive
Stars: ✭ 143 (+0%)
Mutual labels:  api
Apifairy
A minimalistic API framework built on top of Flask, Marshmallow and friends.
Stars: ✭ 141 (-1.4%)
Mutual labels:  api
Awesome Documentation Tools
🔥 📚 All the tools, processes and resources you need to create an awesome API & Project documentation
Stars: ✭ 138 (-3.5%)
Mutual labels:  api
Migrationminer
A tool to detect migration code between two Java third-party libraries
Stars: ✭ 140 (-2.1%)
Mutual labels:  api
Extension
Simple browser extension for managing accounts in a browser and allowing the signing of extrinsics using these accounts. Also provides a simple interface for compliant extensions for dapps.
Stars: ✭ 139 (-2.8%)
Mutual labels:  chrome

electron-extensions

electron-extensions will allow you to use Chrome extensions APIs with Electron.

Installation

$ npm install electron-extensions

Usage

The library is really easy-to-use. All you have to do is to put the following code in your main process:

import { ExtensibleSession } from 'electron-extensions/main';
import { app } from 'electron';

const extensions = new ExtensibleSession();

(async () => {
  await app.whenReady();
  extensions.loadExtension('C:/.../abcdefghijklmnoprstuwxyz'); // Path to the extension to load
})();

Documentation

Class ExtensibleSession main

new ExtensibleSession(options: IOptions)

  • options object
    • partition string - By default null. It's used for injecting preloads to load content_scripts in all webContents within a given Electron session. Must be called in app ready event.
    • preloadPath string - Path to content preload script. The option can be useful for bundlers like webpack if you're using CopyWebpackPlugin.
    • blacklist string[] - List of URLs or glob patterns preventing from injecting content_scripts to. For example [wexond://*/*].

It's only for the main process. It's used to load extensions and handle their events.

Instance methods

loadExtension(path: string)

Loads an extension from a given path.

addWindow(window: Electron.BrowserWindow)

Adds a BrowserWindow to send and observe UI related events such as

  • chrome.browserAction.onClicked

Instance properties

blacklist string[]

List of URLs or glob patterns preventing from injecting content_scripts to. For example [wexond://*].

Events

set-badge-text

Emitted when chrome.browserAction.setBadgeText has been called in an extension.

Returns:

  • extensionId string
  • details chrome.browserAction.BadgeTextDetails

create-tab

Emitted when chrome.tabs.create has been called in an extension.

Example:
import { extensionsRenderer } from 'electron-extensions';

extensionsRenderer.on('create-tab', (details, callback) => {
  const tab = createTab(details); // Some create tab method...
  callback(tab.id);
});

Returns:

  • details chrome.tabs.CreateProperties
  • callback (tabId: number) => void - Must be called with the created tab id as an argument. Also, the tabId must be the same as any attached webContents id

Object extensionsRenderer

Usage in renderer

import { extensionsRenderer } from 'electron-extensions/renderer';

Instance methods

browserAction.onClicked(extensionId: string, tabId: number)

Emits chrome.browserAction.onClicked event in a given extension.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].