Get Chrome to open Google Cloud Storage links - google-chrome

I would like to be able to open a tab in Chrome and enter something like gs://bucket-name/path/to/file and have it open the corresponding page in the GCP Web Console https://console.cloud.google.com/storage/browser/bucket-name/path/to/file. I saw there are external protocol handlers in Chrome, but I don't want to open an external application. I just want it to open another page based on the URI. I also don't want to put up any of my own servers for this simple purpose. Perhaps a Chrome Extension that can do some simple JS on the URI after I enter it into the address bar?

I think it is possible now with link you gave (works for me).
#shiv turned my attention on fact that this is question about automated link replacement under the hood in address bar when you write "gs://bucket-...". So such handler just collects address and modifies it and uses modified version to go further.
Well then looks like you need something like this Set custom protocol handler in Firefox? (in case of Firefox) but unfortunately I cannot help more.

Related

Chrome Dev Tools not showing request URL after hash # (aka fragment)

I am doing some debugging and would like to see the full URLs in developer tools, but I could not find a way for that.
Therefore I would like to know:
Is there a way to achieve it? If not, then how do I deal with it?
Why Chrome by default is not showing this info? I don't think it could be a security issue, as Chrome is displaying all other sensitive info.
Example:
When I go to https://stackoverflow.com/abc#qwerty:
This is what I see in the network tab:
What you see in the dev tools are the request that are sent to the server. What’s behind the # is actually not sent to the server, it’s used by SPA (single page application) to keep track of the state between pages
You can use Firefox for this case, their Dev Tools show the full URI including the fragment identifier after the hash sign.
Alternatively, you can view it in JS console using location.hash property:
screenshot

how to use google search in googleweblight

I'm trying to browse this url: googleweblight.com/?lite_url=http://www.google.com
but I'm not able to, since I got:
Transcoding test failed:
This page could not be transcoded due to technical issues.
The problem is that I need to copy paste every search result I get from google search page into googleweblight.com/?lite_url=[here]
Why am I not able to use googleweblight for google? How can I make my urls go to googleweblight version directly, without copy and paste and not using a device emulator in user agent?
On Firefox, I am using the UAControl add-on to change my browser's User-Agent to Mobile Safari, and it gives me the mobile version of Google Search, which by default has all search result URLs pointing via GoogleWebLight.
In fact, since I didn't want the URLs to be redirected via GoogleWebLight as such, I had to write a GreaseMonkey script to convert them back to 'regular' (direct) URLs. Maybe you can modify it to do the opposite on the Google Search page, if you're not comfortable with the User-Agent switch approach. I believe you can utilize something like TamperMonkey if you're on a different browser such as Google Chrome.

Browser highlight support for my very own protocol handler

I'm using a class to register my protocol, lets say lorem: to operating system. Its working perfect but I would like to do couple of things.
I want to create something like Skype Click to Call. People will share uri's like lorem://12345678 and when others click this the event handler will redirect that request to my windows application. I want to make this uri clickable. How can identify this new scheme to browsers so when a page contains lorem://12345678, browser will transform it something like
lorem://12345678 and users be able to click it.
Can I do it with browser configuration or should I write some kind of extension to implement this rule. It must support all browsers so is that means I need to write same extension for Chrome, Firefox and IE? And how can I install all extensions with my software setup?
Straight to point question: I want to transform lorem://ipsum text to My URL! on most popular browsers
as i understood -- you need to write extensions for each browser, check out this question:
how do I create my own URL protocol? (e.g. so://...)
and this is an example of browser approach:
Custom protocol handler in chrome

Is it possible to hide extension resources in the Chrome web inspector network tab?

When I'm viewing the downloaded resources for a page in the Chrome web inspector, I also see the HTML/JS/CSS requested by certain extensions.
In the example above, indicator.html, indicator.js and indicator.css are actually part of the Readability Chrome extension, not part of my app.
This isn't too big a deal in this particular situation, but on a more complex page and with several extensions installed, it can get quite crowded in there!
I was wondering if there was a way to filter out any extension-related resources from this list (i.e. any requests using the chrome-extension:// protocol).
Does anyone know how I could achieve this?
Not quite the solution I was after (I'd have preferred a global setting), but there is now a way to filter out requests from extensions, as mentioned by a commenter on the issue I originally opened.
In the network tab filter box, enter the string -scheme:chrome-extension (as shown below):
This is case-sensitive, so make sure it's lowercase. Doing this will hide all resources which were requested by extensions.
Just enter "-f" in Network field
Was having the same question when my extension adds a lot of noise in the network tab.
Some extensions also fire a lot of data like data:text/image etc, you can append more filter with - like:
-scheme:chrome-extension -scheme:data
Another way to get the http/https requests is to just use scheme:https without - because the resources that extensions request are usually from their local bundle:
scheme:https
An Incognito Window, can be configured to include or exclude extensions from the extensions page of Chrome settings.
One alternative is to go to "Network Request blocking" tab and add "chrome-extension:" to the list, thus extension requests will be blocked and coloured red so it's easy to visually filter them out.
you can simply enable this option and requests from extension will be group.
Update: It can only group requests that create by the extension that draw iframe, such as cVim

How to block a specific URL in google chrome extension?

I am trying to develop a chrome extension which blocks a specific URL like gmail.com and when someone goes to gmail.com they got pop up to enter the password to continue to that website, this may decrease unauthorized way of accessing your personal sites.
If you know something about let me know, I have googled some extension and there are two-three extensions which block sites like stay focused.
The simplest way to do this is to inject a content script to all pages that should be 'protected' (you can set it up using "content_scripts"/"matches" setting in manifest.json). When script is injected and fired it should display the login dialog and handle the sign in process. You may use this code as a starting point for your extension.
BTW, I don't think that your extension can really protect anything working the way you described it. Extensions may be easily deactivated/uninstalled.