Unable to use Chrome Experimental Devtools API - google-chrome

I'm trying to use the Chrome Experimental Devtools API.
I've tried running Chrome with: --enable-experimental-extension-apis as suggested here: http://developer.chrome.com/extensions/experimental.html and enabled the "Experimental Extension APIs" in the flags settings.
When I open the Console in Chrome (or Canary), I get the following:
chrome.devtools: undefined
chrome.experimental: undefined
I'm running Chrome 21.0.1180.77 beta-m. I've also tried Canary.
What am I missing?

As explained here: http://developer.chrome.com/extensions/devtools.html, the chrome.devtools APIs are only available in your devtools HTML page.
First, you need to create an HTML file and then add it to your extension's manifest under the "devtools_page" key. When you load your extension into Chrome and open the DevTools, you should see your new tab.
In that tab is the only place chrome.devtools will work.
chrome.experimental is different and will be available in all of your background pages and content scripts.

You need to run it only in Canary.
Plus when you run chrome add this flag to the command line:
path_to_chrome.exe --enable-experimental-extension-apis

Related

Can't open Adblock page from within Chrome Extension

I'm trying to allow users to add an Adblock Whitelist via a Chrome extension. To allow this there is the API like such:
1) Add The Ebates WhiteList
However if I add that link to a Chrome extension popup window the link doesn't go anywhere. My guess is that the Chrome extension execution context isn't aware of Adblock/able to support that API. Is anyone who is more of an extension wizard than myself able to verify that I'm correct in my assumption and that there is no workaround? Thanks!

chrome disable security messed chrome functioning

google image
Hi, stackoverflow, i am trying to debug a react native app on a Mac and when i open chrome in disabled security mode, the data rendered by google chrome is not normal.
google resultas are not shown, and the design of chrome get messed (the image above)
this is the command : open /Applications/Google\ Chrome.app --args --disable-web-security --user-data-dir
You are probably using Chrome 67.
This problem has been fixed in the last Canary, so you can:
wait for the next Chrome
use an old version (e.g. install Chromium 66)
or you can:
Add the --disable-site-isolation-trials argument to chrome via https://docs.cypress.io/api/plugins/browser-launch-api.html#Usage
Reference: https://github.com/cypress-io/cypress/issues/1951#issuecomment-401579981

Is there a browser-sync option to open Google Chrome in incognito mode?

I've taken a look at the documentation but it's a little thin on what values are acceptable. Does anyone know if there's a value to open Google Chrome incognito and/or have a complete list (who knows I might want to open a project in IE/Edge one day).
I've tried:
browser: "google chrome -incognito"
browser: "-incognito"
browser: "incognito"
Not many more alternatives, I reckon.
Thanks in advance!
Chrome's command line switch is actually --incognito (two dashes), but I tried it in my browsersync Gulp task and that didn't work.
The workaround I'm using is to use a Chrome extension to switch my development domain name to incognito. It looks like there are a couple extensions that do that, I use Ghost Incognito:
https://chrome.google.com/webstore/detail/ghost-incognito/gedeaafllmnkkgbinfnleblcglamgebg?hl=en-US
in general, I created a shortcut to launch the browser in private mode. then in browser-sync settings added parameter:
browser: 'absolute path to shortcut'
Hurrah!

How to get Chrome to allow mixed content?

Chrome browser by default is blocking mixed content. How do I adjust my settings/configuration to allow mixed content without making any adjustments on the UI every time?
I have found two solutions but neither of them work:
Several articles say you can adjust this under the Security section
of "Under the Hood" in the Options. This option no longer seems to
exist. There is no Under The Hood tab and there is no such dropdown
to adjust how Chrome handles mixed content as far as I can tell.
Another option is to add the --allow-running-insecure-content flag
to your command line. I did this like so: "C:\Program
Files\Google\Chrome\Application\chrome.exe"
--allow-running-insecure-content. However this made no difference. If I tried adding the flag inside the double quotes, then Windows
complains saying it is invalid.
So what option do I have now with the latest version of Chrome?
Steps as of Chrome v91 (6/17/2021):
Click the Not secure warning next to the URL
Click Site settings on the popup box
Near the bottom of the list is Insecure content, change this to Allow
Close settings, go back to the site, and Refresh the page
Older Chrome Versions:
timmmy_42 answers this on: https://productforums.google.com/forum/#!topic/chrome/OrwppKWbKnc
In the address bar at the right end should be a 'shield' icon, you can
click on that to run insecure content.
This worked for me in Chromium-dev Version 36.0.1933.0 (262849).
In Windows open the Run window (Win + R):
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --allow-running-insecure-content
In OS-X Terminal.app run the following command ⌘+space:
open /Applications/Google\ Chrome.app --args --allow-running-insecure-content
Note: You seem to be able to add the argument --allow-running-insecure-content to bypass this for development. But its not a recommended solution.
The shield icon that is being mentioned was not in the sidebar for me either, however I solved it doing the following:
Find the shield icon located in the far right of the URL input bar,
Once clicked, the following popup should appear wherein you can click Load unsafe scripts,
That should result in a page refresh and the scripts should start working. What used to be an error,
is now merely a warning,
OS: Windows 10
Chrome Version: 76.0.3809.132 (Official Build) (64-bit)
Edit #1
On version 66.0.3359.117, the shield icon is still available:
Notice how the popup design has changed, so this is Chrome on version 66.0.3359.117.
Note: The shield icon will only appear when you try to load insecure content (content from http) while on https.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" " --allow-running-insecure-content"
On OSX using the current Chrome build (2/20/2020, 79.0.3945.130), you can:
Click on the 'i' info icon on the left side of address bar.
Click Site Settings
Scroll down to Insecure content
Change it from Blocked (Default) to Allow
Reload the page and try your action again.
running the following command helps me running https web-page, with iframe which has ws (unsecured) connection
chrome.exe --user-data-dir=c:\temp-chrome --disable-web-security --allow-running-insecure-content
Another solution which is permanent in nature between sessions without requiring you to run a specific command when opening chrome is as follows:
Open a Chrome window
In the URL bar enter Chrome://net-internals
Click on "Domain Security Policy" in the side-bar
Add the domain name which you want to always be able to access in http form into the "Add HSTS/PKP domain" section
On OSX the following works from the command line:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-running-insecure-content
Chrome 46 and newer should be showing mixed content without any warning, just without the green lock in address bar.
Source: Simplifying the Page Security Icon in Chrome at Google Online Security Blog.
You could use cors anywhere for testing purposes. But its note recommend for production environments.
https://cors-anywhere.herokuapp.com/
something like: https://cors-anywhere.herokuapp.com/http://yourdomain.com/api

Restoring chrome new-tab w/o uninstalling my extension

I have a chrome extension whick among other things is replacing the new-tab functionallity.
But since i can't restore all the new-tab functionallity (account sync login,bookmarks,web apps,recent sites,most popular).
I want the users to be able to restore the default new tab, w/o uninstalling my extension.
From my investigation there is the internal chrome scheme: "chrome-internal://" whick has the URL : chrome-internal://new-tab/ .
When i try to navigate to it from my extension it does not seem to work (premission denied,although i requested it within the mainfest).
But when navigating to it from chrome (js console) it does show the default new tab.
Any help will be appreciated.
In a Chrome extension, you can set a tab to display the original chrome new tab page by calling update on it:
chrome.tabs.update({
url: 'chrome-internal://newtab/'
});
The "New Tab" chrome extension does this. View the code on GitHub.
Alex is right. from Chrome 33+
https://www.google.co.jp/_/chrome/newtab?ie=UTF-8
replace chrome-internal
and chrome://apps works.