Skip to content

Instantly share code, notes, and snippets.

@intarstudents
Forked from Rob--W/manifest.json
Created July 31, 2020 07:03
Show Gist options
  • Save intarstudents/df82534d62b3843626cedb43aba2f8d6 to your computer and use it in GitHub Desktop.
Save intarstudents/df82534d62b3843626cedb43aba2f8d6 to your computer and use it in GitHub Desktop.
Dummy extension to prevent elision of "http" / "file" / subdomains from the omnibox in Chrome. Use this instead of the "Suspicious Site Reporter".
// This is a dummy extension that prevents elision of "http" / "file" / subdomains
// from the omnibox by impersonating the "Suspicious Site Reporter" extension.
// Do not use this if you use the "Suspicious Site Reporter" extension.
//
// Usage:
// 1. Create a directory, e.g. "prevent-elision-in-locationbar"
// 2. Put the content of this file as "manifest.json" in that directory.
// 3. Visit chrome://extensions, choose the "Load Unpacked" button and select the directory.
// (OR use the --load-extension=path/to/prevent-elision-in-locationbar flag to load the extension)
// Result:
// - Schemes such as "https" / "file", and domains are not elided any more.
// Alternative:
// - Start Chrome with the following flag:
// --disable-features=OmniboxUIExperimentHideSteadyStateUrlScheme,OmniboxUIExperimentHideSteadyStateUrlTrivialSubdomains,OmniboxUIExperimentHideFileUrlScheme
//
// Note: The "http" scheme will still be elided.
// If you want to preserve "http", compile Chromium yourself, with this patch:
// https://github.com/Rob--W/https-by-default/blob/master/chrome/https-by-default.patch
{
"name": "ShouldPreventElision() = true",
"description": "Prevent elision; equivalent to --disable-features=OmniboxUIExperimentHideSteadyStateUrlScheme,OmniboxUIExperimentHideSteadyStateUrlTrivialSubdomains,OmniboxUIExperimentHideFileUrlScheme",
"version": "1",
"manifest_version": 2,
// Extension ID jknemblkbdhdcpllfgbfekkdciegfboi
// From https://chromium.googlesource.com/chromium/src/+/40dbe9f7832e6c975e22ee2c9a3335ff8e878220/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc#42
// Chosen because having the extension enabled prevents various parts of the omnibox from being stripped
// https://chromium.googlesource.com/chromium/src/+/c26ef30d0961cbcdf2a226792922d73e6a1fc59f/components/omnibox/browser/location_bar_model_impl.cc#54
// Introduced in https://bugs.chromium.org/p/chromium/issues/detail?id=914422
// Created on 9 July 2019, tested in Chromium 75.0.3770.90
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAowA8wOUQ8ShyITJ15B9rcJrnoolyo+OLj07g8QWBlEBikgszYwlbc88OIRL+dJOASok3yG6RQ60fvIjBrtNEk1yQZJfNwF/CN0jFrkE3HN3xVMoX0XIQPB93kDZARcfR5nwU3RUgwwWGTqt69KSSU8QzRRQJSEgM8GENa3OBhw1UBn/I/RbhaFcTykJSomo9j55goJwNzUhXTJk458DQ5diY+gWMadDXlDBa8cciCVlaGOjBV5ezmxnD6p1GXhrvyEKZP8IlreDJC2Nw9hxrT3GIo1FzbmeDPANKJ9pkY1H3LOVsGJDtytBpD/FRErlvfkJVqp3N5ifF2EQ8lOAHrQIDAQAB"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment