Creating a Badge-less Google Chrome Extension - google-chrome

According to the docs I have made an Google Chrome Extension that I would describe as a "browser action" because it is present on all pages. However, my extension doesn't require any interaction so having a badge next to the omnibox is pretty wasteful. I have installed extensions that do not appear anywhere (except maybe in the context menu). How is that done and is that best practice?

Having page action or browser action icons is totally optional if you don't have any popup attached to them, so just remove the whole browser_action section from your manifest file.

Related

Where can I modify Chrome bookmarks?

I want to code an extension that modifies your bookmarks in Google Chrome. For example, it should expand different sub-sites (e.g. reddit subreddits) when hovering over a bookmark.
Where do I find the bookmark function, though? Like the part that says for example "when hovering over an icon, background goes grey". I'd have to modify exactly those parts.
For what you are referring to, a simple CSS style modification will achieve. To implement an extension into chrome, you will want to start here:
Google Chrome Extension Development
Some resources for you:
Developer Guide - this contains all the extensible chrome APIs
chrome.bookmarks API - this is the API that will interact with and manipulate bookmarks
There are also some resources out there that are helpful for learning how to create a chrome extension. A good starting point may be this:
How to create and publish a chrome extension in 20 minutes

Is there a way to stop Google Chrome from showing most visited sites on a blank tab?

Whenever I open a new tab in Google Chrome I see the Google search bar plus 8 thumbnails of recently visited (or most visited) sites. I never click on the thumbnails and find them to be annoying. Is there anyway to disable this in Chrome?
I can think of a hacky workaround like creating a blank page someplace and setting that to be the new tab page, but there must be a better way. Any ideas?
Since nobody answered I thought I would post and answer to my question:
Use the Empty New Tab Page extension for a new blank tab instead of the default new tab.
There are also some redirect extensions such as Momentum, which loads a different full screen image each day.
type chrome://flags then Disable "Top Sites from Site Engagement"
Chrome allows extensions to run on chrome:// urls so one such possible future solution is if AdBlock explicitly requests the permission to run on chrome://newtab then you can just block the div with id most-visited. But currently AdBlock does not request this permission.
You could edit the manifest of AdBlock manually to include this permission or suggest it as a future feature.
The default new tap page's url is chrome-search://local-ntp/local-ntp.html. You can press F12 to check it. It's a local resource located in
C:\Program Files (x86)\Google\Chrome\Application\{Version}\resources.pak
or
C:\Users\%username%\AppData\Local\Google\Chrome\Application\{Version}\resources.pak
Open it with a HEX editor, search text
cur.style.opacity = 1.0
, and replace it with
cur.style.opacity = 0.0
Tested on Chrome 77.0.3865.90 .

Options page in new Firefox WebExtensions API

Is there a way to write addon options page in new Firefox WebExtensions API?
For example Google Chrome supports manifest key "options_page"
I searched through documentation and wiki but can't find anything on this point.
This answer is out of date as WebExtension support expands.
See Implement a settings page on MDN (and please upvote this answer for providing this link first).
It does not seem like "options_page" manifest key is supported as of now.
Its main use is providing UI discoverability of the options page; a link to it in the extension list, for instance.
If you're porting an existing extension, you'll need to add some other UI in your extension to open the page (e.g. a link in the popup, if the extension has one). You can simply open it with chrome.tabs.create like you would open any page and it will work identically.
A little caveat: if the extension uses OptionsV2-provided CSS styling, you'll need to compensate for its absence.
Another caveat: the chrome.runtime.openOptionsPage() function is not available in Firefox and should be replaced by a shim using chrome.tabs.
Use the options_ui key in your manifest.json. There is nice guide on MDN on how to do this - Implement a settings page.
Both "options_page" and "options_ui" will be implemented in Firefox WebExtensions!
Here is the link for tracking progress http://arewewebextensionsyet.com/#options

Google Docs viewer disable download

Please take a look at this link
http://jsfiddle.net/C7Py6/3/
The last icon on google viewer's toolbar - enables user to view on new browser window and download PDF. The question is, how can I make it view only and disable download (At least disable this toolbar item). Is that possible with google viewer? or is there any other viewer that works like Google Viewer but view-only?
You can host your PDF files on Google Docs and prevent viewer downloads. To do this do followings:
Once you login into your Google Docs account at docs.google.com website, you should see listing of documents in your account. Right click specific document that you want to secure by disabling download option.
Then click on “prevent viewers from downloading” option. This will remove downloading option and other users viewing the document cannot download the document file as a whole and reproduce its copy.
Also note, since you can only prevent downloading of documents created by you, click ‘Owned by Me’ option on left side. This will display document created and owned by you. Then you can disable and prevent document downloading option for files on display.
Then you can just share this PDF on your website. IT will be view only. The code will look like that:
<iframe src="url to pdf/preview" width="640" height="480"></iframe>
This is a simple way to control all features of Google Apps http://www.saasid.com/what-we-do/saasid-for-google-apps/
Application feature control gives organisations full management of application features and functions with no complex changes to theapplication back-end. Tabs, menu options, buttons and links can be can be disabled or removed from view, or their use can simply be monitored and logged. Application feature control features for Google Apps include:
Gmail can be made corporate-only,
File attach to Gmail messages can be removed,
Chat boxes removed,
Sharing options removed from menu or document editor in Google Drive
This technique will still allow the user to "make a copy" and with ownership this brings they can then download as they please. Not tested this, but I'm pretty sure I'm right...

Chrome extension that adds icon to omnibox

I've done a lot of googling and have come up dry on this. I feel like I've seen it before but I can't find any extension in my arsenal that allows this.
What I would like to do is have a chrome extension that can place an icon (or text, even better) at the right side of the omnibox in chrome.
Does anyone know if this is even possible?
What you're looking for is called a Page Action.
In which application should we use Page Actions? If you want to add your extension's features to a few specific pages, use Page Actions. Otherwise, if you want to add features in most pages, use Browser Actions instead. Text cannot be added in Page Actions, though it can be added in Browser Actions with limitation by using Badge (a bit of text that is layered over the icon).
Some good examples of this kind of extensions to help you picture the concept:
Google's RSS Subscription Extension. This extension only injects if it finds RSS feeds on a page
Lyrics for Google Chrome. This extension only injects its scripts in YouTube pages, create a new div next to the video to display the lyrics of a music vid.