Socket
Socket
Sign inDemoInstall

@polypane/electron-chrome-extensions

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polypane/electron-chrome-extensions - npm Package Compare versions

Comparing version 3.15.3 to 3.16.0

1

dist/browser/api/tabs.d.ts

@@ -14,2 +14,3 @@ import { ExtensionContext } from '../context';

private getCurrent;
private getSelected;
private create;

@@ -16,0 +17,0 @@ private insertCSS;

@@ -101,2 +101,15 @@ /******/ (() => { // webpackBootstrap

};
function patchWindowOpen() {
// ts-ignore
window.open = function (url, target, windowFeatures) {
//const result = original.apply(this, [url, target, windowFeatures]);
if (typeof url === 'string') {
console.log('Patched window.open');
chrome.tabs.create({
url
});
}
return null;
};
}

@@ -107,2 +120,21 @@ // Function body to run in the main world.

var _chrome$runtime;
function patchWindowOpen() {
// ts-ignore
window.open = function (url, target, windowFeatures) {
//const result = original.apply(this, [url, target, windowFeatures]);
if (typeof url === 'string') {
console.log('Patched window.open');
chrome.tabs.create({
url
});
} else if (url instanceof URL) {
console.log('Patched window.open');
chrome.tabs.create({
url: url.href
});
}
return null;
};
}
// Use context bridge API or closure variable when context isolation is disabled.

@@ -112,2 +144,3 @@ const electron = window.electron || electronContext;

const extensionId = (_chrome$runtime = chrome.runtime) === null || _chrome$runtime === void 0 ? void 0 : _chrome$runtime.id;
patchWindowOpen();

@@ -347,2 +380,3 @@ // NOTE: This uses a synchronous IPC to get the extension manifest.

getCurrent: invokeExtension('tabs.getCurrent'),
getSelected: invokeExtension('tabs.getSelected'),
getAllInWindow: invokeExtension('tabs.getAllInWindow'),

@@ -349,0 +383,0 @@ insertCSS: invokeExtension('tabs.insertCSS'),

2

package.json
{
"name": "@polypane/electron-chrome-extensions",
"version": "3.15.3",
"version": "3.16.0",
"description": "Chrome extension support for Electron",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -331,2 +331,3 @@ # electron-chrome-extensions

- [x] chrome.tabs.getCurrent
- [x] chrome.tabs.getSelected
- [x] chrome.tabs.connect

@@ -333,0 +334,0 @@ - [x] chrome.tabs.sendMessage

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc