Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Feature Request: add support for loading chrome extensions #6

Closed
iamKunal opened this issue Mar 3, 2021 · 9 comments
Closed

Feature Request: add support for loading chrome extensions #6

iamKunal opened this issue Mar 3, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@iamKunal
Copy link

iamKunal commented Mar 3, 2021

There are some useful extension the chrome web store that I miss after I moved to the electron client.
E.g. https://chrome.google.com/webstore/detail/google-chat-thread-links/aogkhbmeeckelbhfemleoajbglamokbc

It would be nice to either have their features available or allow people to load their own extensions (via https://www.electronjs.org/docs/tutorial/devtools-extension) even if supplied via the config folder.

@ankurk91
Copy link
Owner

ankurk91 commented Mar 3, 2021

Okay i will try to implement this feature soon.

@ankurk91 ankurk91 added the enhancement New feature or request label Mar 3, 2021
@ankurk91
Copy link
Owner

ankurk91 commented May 16, 2021

@iamKunal
The chrome extension you mention, is no longer working with new UI

I am trying to make some useful extensions to work with this app, for example:

@ankurk91 ankurk91 changed the title Feature Request: Implement features from chrome extensions or add support for loading chrome extensions Feature Request: add support for loading chrome extensions May 18, 2021
@iamKunal
Copy link
Author

@iamKunal
The chrome extension you mention, is no longer working with new UI

They are yet to merge a pr for the new ui upman/gchat-copy#10

@iamKunal
Copy link
Author

@ankurk91 What about tampermonkey support? The only issue might be adding scripts via the UI. For e.g. https://github.com/myreli/chat-extended

@ankurk91
Copy link
Owner

tampermonkey need user to add script, however electron does not have an address bar to show the extension icon

@iamKunal
Copy link
Author

iamKunal commented May 21, 2021

Just saw https://github.com/sentialx/electron-extensions
I also see they mention support for sentialx/electron-extensions#21 (comment)

@ankurk91
Copy link
Owner

i am not in favor of loading extension from hard disk path, i am using this one
https://github.com/MarshallOfSound/electron-devtools-installer
to install from chrome store using the id

@jwaiwit
Copy link

jwaiwit commented Sep 21, 2021

just share my tried (worst). after the browser loaded, try to inject the content js (used to work with old chat) using window.webContents.executeJavaScript(customScript);
document.querySelectorAll('iframe[title="Chat content"]')[0].contentWindow.document.querySelectorAll("c-wiz[data-topic-id][data-local-topic-id]") VM1157:1 Uncaught DOMException: Blocked a frame with origin "https://mail.google.com" from accessing a cross-origin frame. at <anonymous>:1:75

After search, found that chrome-extension have privileges to run on all_frames option.
I might be wrong. This is how far I can reached :D

@ankurk91
Copy link
Owner

I am closing this issue for several reasons

  • Electron has experimental support for extensions
  • This feature is not going to benefit mass number of users
  • Extensions will cause app to consume more RAM and CPU
  • Hard to debug and maintain

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants