New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix content scripts matches #10075

Merged
merged 1 commit into from Jul 24, 2017

Conversation

Projects
None yet
3 participants
@alexstrat
Contributor

alexstrat commented Jul 20, 2017

Script was injected only if the current URL matched the first item of content_scripts[].matchs ignoring the following items

@zcbenz

zcbenz approved these changes Jul 24, 2017

@zcbenz

zcbenz approved these changes Jul 24, 2017

@zcbenz zcbenz merged commit bd87982 into electron:master Jul 24, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@bilalasif

This comment has been minimized.

Show comment
Hide comment
@bilalasif

bilalasif Nov 15, 2017

Hello Guys,
I am very new to electron framework. I am trying to do something what I usually did via chrome extensions. Can you let me know how can we inject a js script using electron like content-script is injected via chrome extensions framekwork?
So far the examples I have came accros are like below which is executed from the main.js:
mainWindow.webContents.on('did-finish-load', function() { mainWindow.webContents.executeJavaScript("alert('Hello There!');"); });
I have heard about BrowserWindow.addExtension wanted to know if there is some other way to do that?

bilalasif commented Nov 15, 2017

Hello Guys,
I am very new to electron framework. I am trying to do something what I usually did via chrome extensions. Can you let me know how can we inject a js script using electron like content-script is injected via chrome extensions framekwork?
So far the examples I have came accros are like below which is executed from the main.js:
mainWindow.webContents.on('did-finish-load', function() { mainWindow.webContents.executeJavaScript("alert('Hello There!');"); });
I have heard about BrowserWindow.addExtension wanted to know if there is some other way to do that?

@alexstrat alexstrat referenced this pull request Jan 17, 2018

Open

This looks cool #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment