Open a chrome:// URL from HTML anchor - html

When running my application in debug mode I would like to display an HTML anchor link that opens the chrome://inspect page (I can safely assume users are using Chrome).
I can construct a link like the following:
Open Chrome Dev Inspector
When hovering over the link, it shows the expected URL in the Chrome status bar, but clicking it does nothing. If I right click and "open in a new window" it just opens a blank page (about:blank).
When clicked, the following error is shown in the console:
Not allowed to load local resource: chrome://inspect/
Is it possible to programmatically open chrome:// URLs?

Related

a href target blank sometimes stucks on about:blank

I am trying to open a google docs link in a new tab on browser like:
Google Sheet
But sometimes link does not open and stucks on about:blank page. But if I press refresh button, the link opens. What can be the problem and how can I fix it?
I tried on Chrome, Opera and Yandex browsers. All of them acts the same.
Dont use the url=
Or download the file and put it in your folder. Then set the href to open or download your pdf. Would this be a sol?

Why chrome shows alert randomly when try to open custom protocol url with location.href?

i had took a look to another threads about chrome and custom protocol apps, but i couldn't resolve a doubt i've got. In my web app, when you click a button it fire a new tab with an webpage (window.open(url, "_blank")). The new tab is opened with the url (annother web app with https protocol). This url fire a javascript function on load that verifies some things and then generate a custom url, for example myurl://base64code, and put it in an existing iframe in this way windows.frames['myframe'].location.href=theCustomProtocolUrl. i tried in different ways (location.replace, create a new iframe and set the url, etc) and i always have the same problem. If i refresh (ctrl f5) the page it always show the dialog or if i open the link with the developer console opened. But if i click my button and the page is opened in a new tab it doesn't work only if i refresh (ctrl+f5). This works perfectly on IE11, it launch the app directly.
Any ideas why chrome, and edge, works like this?
UPDATE: I have found the reason, is i use the protocolcheck.js (https://gist.github.com/vladimirtsyupko/cfcd332476b16683bb0b) library.
First i tried to open a protocol with the timeoutHack (it use blur event) and then, after failing, it fires the other url (in this case https) and the dialog doensn't appear. I found a bug with blur event on chrome > 85 https://bugs.chromium.org/p/chromium/issues/detail?id=1137801
Thanks in advance

How to view the source code of a link that keeps redirecting?

I am attempting to view the HTML source code of the following link like so in chrome:
view-source:https://rankyourbrain.com/mental-math/mental-math-test-easy/submit
But it just redirects to
view-source:https://rankyourbrain.com/mental-math/mental-math-test-easy
What is happening? Is there a way to prevent this (or view source another way)?
Also, let me know if this is the incorrect forum to ask this question...
From the website you wish to view-source, hit F12 inside Chrome to view the debugger. On the Network tab, click the Preserve log checkbox.
Now you can view source without the redirects preventing the source-view page from displaying.
Alternatively, you could use a browser like Safari (on MacOS) to view source and the redirects won't affect it.

How to open page in chrome app via html link

I am trying to convert my html webpage to chrome app, and have found this error:
When trying to click a link to another page within my app, it does not work. I click it and nothing happens. I had a look around, and read that I need to include target="_blank", but that just comes up with an error saying that there is no application set to open that file. I would like the page to open within the chrome app wrapper.
Here is my code: Click here to play

Link to chrome://extensions page in non extension HTML

I am trying to link to chrome://extensions in a normal HTML page (of a non-extension). However clicking the link won't do anything:
chrome://extensions
Right-clicking and opening in new tab just opens the about:blank page. How do I provide a working linking to the Chrome extensions page?
As you can see if you open the console, this is completely impossible, for security reasons.