How to Edit chrome extension contentscript Source Files Directly in Chrome - google-chrome-extension

I know that we can edit source directly in chrome,
and we can edit the extension background.js in chrome,
just like: https://www.sitepoint.com/edit-source-files-in-chrome/
but how can I edit the contentscript in chrome devtools?
I have set source->filesystem, but it does not seem to work.

Related

neutralinojs - how to load browser extension when starting chrome mode?

I have a web page and custom extension that goes with it. The extension is a normal browser extension - not a neutralinojs extension. I can load my extension from the command line (without neutrinojs) with chrome and msedge using the --load-extension=<path-to-extension> option. Extension and page work fine.
I'm having difficulty figuring out how to achieve the same thing with neutralinojs.
I've tried passing the option via the neutralino.config.json config file [example below] and starting the page with neu run. The page loads, but the extension isn't loaded. Near the top of the JSON file, I specify "chrome" as the mode. I'm certain it is starting chrome.
"chrome": {
"width": 500,
"height": 700,
"args": "--load-extension=C:\\project\\my-extension",
"nativeBlockList": [
"filesystem.*",
"os.*"
]
}
I also tried a more direct approach with neutralino-win_x64.exe --chrome-args="--load-extension=C:\project\my-extension". It seems the JSON file isn't read in when I try it this way, and it's not clear to me how to format the other options that need to be passed to it.
How should I go about getting my custom extension loaded when starting in chrome mode? And could I also get neutralinojs to start with msedge instead of chrome with additional chrome options passed to it.

Removing "google doodle" using localhost chrome extension

How do I remove animated google doodle using localhost chrome extension?
Obviously I cannot comment so ....
If you have loaded jquery with content-scripts in manifest.json then this is quite easy by adding to
content.js a line:
$( "div#lga" ).replaceWith( "<h2>Freedom!</h2>" );

Google Chrome Extension default in a new tab

so I am trying to make a google chrome extension and I want it to open when you open a new tab. Kind of like muz.li. Basically, when you press ctrl+t to open a new tab instead of showing google, it shows my extension.
Thanks!
Simple add the code below to open the extension when a new tab is opened, you don't need a background js or html file. It is in the manifest.json file:
"chrome_url_overrides": {
"newtab": "page.html"
},
I suggest to use the chrome.tabs.onCreated event to detect when someone opens up a new tab.
https://developer.chrome.com/extensions/tabs#event-onCreated

What is wrong with this chrome extension?

I have downloaded this chrome extension https://github.com/jeffreyiacono/penalty-blox
When I load it via load unpacked extension it gives me this error
1.manifest_version key must be present and set to 2
I solved it via adding manifest_version in manifest.json
2.After this when I reload it,The icon is coming but when I click on it nothing is working(looks like background.html is not working)
What changes should I do so that it workes perfectly?

Avoiding reloading of Google Chrome extension

I am developing Google Chrome extension. Each time my JavaScript source changes, I find myself having to click "load unpacked extension" again to have the changes take effect.
Reloading the extension at each iteration is very tedious. Can it be avoided?
Depends on the asset, lets review:
Asset ----------------------------------------- Action needed
popup.html HTML -------------------------- Refresh browser page
popup.html JS ------------------------------- Refresh browser page
contentscript via manifest ----------------- Reload extension
contentscript via executeScript (code) - location.reload(true) on background page
contentscript via executeScript (file) ---- Refresh browser page
background.html HTML ------------------- location.reload(true) on background page
background.html JS ------------------------ location.reload(true) on background page
For more information on how to do the location.reload(true) see the page on debugging
The content script requiring a plugin reload has been brought up recently and acknowledged by the chromium team:
http://code.google.com/p/chromium/issues/detail?id=104610
Consider using programmatic injection (contentscript via executeScript (file)) to avoid having to reload the plugin for content script updates.

Resources