Re: [crx] Digest for chromium-extensions@chromium.org - 21 updates in 10 topics

54 visualizações
Pular para a primeira mensagem não lida

Christian, Joseph

não lida,
16 de set. de 2022, 15:07:5816/09/2022
para chromium-...@chromium.org
gjbhb

On Fri, Sep 16, 2022 at 9:02 AM <chromium-...@chromium.org> wrote:
Robbi <rob...@gmail.com>: Sep 16 04:44AM -0700

No way. The support team was quick to answer me but more than a response it
was a bounce.
I was in fact diverted to this group and S.O.
Amen, we'll get over it.
In the last few days, however, I have noticed that in my manifest.json
there is both "options_ui" and "options_page" and the latter would seem
deprecated. Perhaps this is the origin of my problem.
 
Il giorno giovedì 15 settembre 2022 alle 01:57:03 UTC+2 Robbi ha scritto:
 
Luca Turgueniev <jekyll...@gmail.com>: Sep 15 09:54PM -0700

Hi guys, how can I see the information that I save in the chrome local
storage? I used a form to save some data so I could pass it to the content
script. Everything works fine, the popup gets the info and the content uses
it. But... I really wanna know where it's stored, it doesn't appear neither
in my background page nor content script website nor the popup html. I
don't know where is it
majid shirazi <majidsh...@gmail.com>: Sep 16 11:30AM +0430

Hello, I am from Iran, I wanted to give you your telegram address and help
me with some programming
 
در تاریخ جمعه ۱۶ سپتامبر ۲۰۲۲،‏ ۹:۲۵ Luca Turgueniev <jekyll...@gmail.com>
نوشت:
 
wOxxOm <wox...@gmail.com>: Sep 16 04:22AM -0700

See https://stackoverflow.com/a/32471596 which describes how to use Storage
Area Explorer extension.
 
Tazim mahta <tanzi...@gmail.com>: Sep 15 11:52AM -0700

Hello,
I was trying to migrate an extension from mv2 to mv3. And facing this error
:
*'content_security_policy.extension_pages': Insecure CSP value
"https://www.google-analytics.com" in directive 'script-src'.Could not load
manifest.*
 
For a better view, you can check this simplified repo:
https://github.com/tahid02/mv3-analytics
 
currently:
*manifest.json *
"content_security_policy": {
"extension_pages": "script-src 'self' https://www.google-analytics.com
https://www.googletagmanager.com; object-src 'self'"
},
 
*gtm.js*
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-XXXYYYY");
 
*uxprinciple.html file( shows in chrome_url_overrides.newtab )*
<html>
<head>
..............
<script type="text/javascript" src="gtm.js"></script>
</head>
<body>
<noscript>
<iframe src="//www.googletagmanager.com/ns.html?id=GTM-PXP2XMN"
height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
..............
</body>
</html>
 
 
Any help to migrate this in mv3 will be much appreciated. Thanks in advance.
PhistucK <phis...@gmail.com>: Sep 16 12:08AM +0100

As far as I know, you cannot load external scripts into regular extension
pages. You have to use a sandbox, webview or similar (sorry, not too
familiar with the options).
 
☆*PhistucK*
 
 
Tazim mahta <tanzi...@gmail.com>: Sep 15 10:29PM -0700

Thanks for your reply. Do google analytic work if we use the script( like:
downloaded this https://www.google-analytics.com/analytics.js file in
local machine . so, no external load! ) from the local file?
 
On Friday, September 16, 2022 at 5:09:15 AM UTC+6 PhistucK wrote:
 
majid shirazi <majidsh...@gmail.com>: Sep 16 11:29AM +0430

Hello, I am from Iran, I wanted to give you your telegram address and help
me with some programming
 
در تاریخ جمعه ۱۶ سپتامبر ۲۰۲۲،‏ ۹:۵۹ Tazim mahta <tanzi...@gmail.com>
نوشت:
 
PhistucK <phis...@gmail.com>: Sep 16 09:57AM +0100

I never tried, no idea. Maybe others know, though.
 
☆*PhistucK*
 
 
majid shirazi <majidsh...@gmail.com>: Sep 16 11:30AM +0430

Hello, I am from Iran, I wanted to give you your telegram address and help
me with some programming
 
botanrice <14bena...@gmail.com>: Sep 15 11:43AM -0700

Thank you @wOxxOm and @Stefan vd, I appreciate your help. I am new to
working on this kind of stuff. I moved the return to outside of the "if"
and got it to work!
 
But @wOxxOm, when you say that I don't need the background.js to handle
indexedDB, do you mean that I could instead instantiate my database upon
extension install in popup.js? My background.js currently loads some
initial data to the database when the extension is installed.
 
 
 
On Wednesday, September 14, 2022 at 2:50:27 PM UTC-4 wOxxOm wrote:
 
Stefan vd <stefa...@gmail.com>: Sep 15 11:46AM -0700

Hi botanrice,
 
You are welcome.
 
Thanks,
Stefan vd
On Thursday, September 15, 2022 at 8:43:15 PM UTC+2 botanrice wrote:
 
wOxxOm <wox...@gmail.com>: Sep 15 10:52PM -0700

> But @wOxxOm, when you say that I don't need the background.js to handle
indexedDB, do you mean that I could instead instantiate my database upon
extension install in popup.js? My background.js currently loads some
initial data to the database when the extension is installed.
 
Depends on what you do, but indeed it's more reliable to check the database
every time you access it and recreate it as necessary because the user may
have deleted it either intentionally to clear the data or it got deleted
due to an external accident.
 
On Thursday, September 15, 2022 at 9:46:39 PM UTC+3 Stefan vd wrote:
 
majid shirazi <majidsh...@gmail.com>: Sep 16 11:29AM +0430

Hello, I am from Iran, I wanted to give you your telegram address and help
me with some programming
 
Uday prasad <udaypr...@gmail.com>: Sep 15 11:49PM -0700

I am trying to create chrome extension v3 with existing reactjs and
typescript project.
 
*manifest.json :*
 
{
"name": "Sample project",
"description": "Sample Chrome extension",
"version": "1.0",
"manifest_version": 3,
"action": {
"default_popup": "popup/index.html",
"default_title": "Open the popup"
}
}
 
*'build/index.html':*
 
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="/logo.svg"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="theme-color" content="#000000"/>
<meta name="description" content="Sample"/>
<link rel="apple-touch-icon" href="/logo.svg"/>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"/>
<link rel="manifest" href="/manifest.json"/>
<title>%REACT_APP_TITLE%</title>
<link href="/static/css/main.cbea6d6a.chunk.css" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="/static/js/runtime-main.4c57f821.js"></script>
<script src="/static/js/20.8cf1cbff.chunk.js"></script>
<script src="/static/js/main.8cf78120.chunk.js"></script>
</body>
</html>
 
*'build' folder structure and files:*
 
- build
- static
- css
- main.cbea6d6a.chunk.css
- js
- 20.8cf1cbff.chunk.js
- main.8cf78120.chunk.js
- runtime-main.4c57f821.js
- some other chunk files
- media
- asset-manifest.json
- logo.svg
- index.html
- manifest.json
- robots.txt

 
When I click the extension in developer mode the following error is
generated:
 
 
- Your file couldn’t be accessed. It may have been moved, edited or
deleted. ERR_FILE_NOT_FOUND
 
 
What might be the cause and necessary changes need to be done?
 
If possible, ready to connect through google meet.
"hrg...@gmail.com" <hrg...@gmail.com>: Sep 15 05:40PM -0700

The chrome.tabs.executeScript() function doesn't exist in Manifest V3. You
have to use chrome.scripting.executeScript() which cannot execute a string
of code.
You have two choices if you want to change or fix your extension's logic
without going through a new review process.
 
1. Parameterize as much as possible the part of the code that needs
frequent changes/tweaks/fixes and obtain those parameters as a JSON string
from your server.
2. Remove the code that needs frequent changes from your extension and
put it in your server. Then, from your extension you can make calls to your
server to execute the necessary code and get the results you need.
 
 
Method #2 is what they mean by "*Consider migrating application logic from
the extension to a remote web service*".
 
Of course, this assumes you have a server to begin with. If you don't have
one, then you have no choice whatsoever.
 
 
On Thursday, September 15, 2022 at 8:24:40 AM UTC-3 Dmytro Chumak wrote:
 
wOxxOm <wox...@gmail.com>: Sep 15 08:56AM -0700

As long as Chromium team ignores our pain <https://crbug.com/1338871>,
you'll have to build your own Chromium with the restriction lifted
<https://crsrc.org/out/Debug/gen/extensions/common/api/permission_features.cc;l=848;drc=f7c258b9edbcebc3fb62f1df4af9d6afd3133d52>
or patch chrome binary, for example:
https://github.com/Ceiridge/Chrome-Developer-Mode-Extension-Warning-Patcher/issues/82
 
wOxxOm <wox...@gmail.com>: Sep 15 07:18AM -0700

I opened 219 issues of which about a half was fixed so don't give up.
 
On Thursday, September 15, 2022 at 5:01:56 PM UTC+3 Robbi wrote:
 
Robbi <rob...@gmail.com>: Sep 15 07:40AM -0700

Wow, you will have spent a good chunk of your life on it :-)
 
Il giorno giovedì 15 settembre 2022 alle 16:18:41 UTC+2 wOxxOm ha scritto:
 
Robbi <rob...@gmail.com>: Sep 15 08:26AM -0700

Et voilà: bug#1364120
<https://bugs.chromium.org/p/chromium/issues/detail?id=1364120>
Anyone who thinks I have forgotten something or have not explained well
enough is welcome for additional considerations or information.
 
 
Il giorno giovedì 15 settembre 2022 alle 16:40:23 UTC+2 Robbi ha scritto:
 
Uday prasad <udaypr...@gmail.com>: Sep 15 07:05AM -0700

Regarding default_popup value what you have mentioned was correct. Thanks
for the input.
On Thursday, September 15, 2022 at 4:52:34 PM UTC+5:30 PhistucK wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to chromium-extens...@chromium.org.
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem