New hub “Chrome Extensions” (from October 2014 - “Extensions for browsers”)
Persistent but Doubtful Growth: Advertising Cutters
At first, many years ago, in the years 2000-2005, there were no browser extensions in the form in which we see them now. Scripts in the browser were implicitly written by the authors of the site and the page observed in the browser. It would seem that there is nothing strange in this - the authors of the site have the full and undivided right to use browser resources ... stop. Found a scythe on a stone. Why should authors of the page use the resources of my browser? To write your own arbitrary scripts that do not allow to show the contents of your own page? Distract bad styles from the content of your page? And the advertisement on it?
And the inquisitive thought of the user earned. My browser - by definition, it should bring convenience to me, and not promote the interests of the owner of the site that I am currently considering. No, of course, there are masochists who will defend the right of the author of the site without being authors, but not everyone will agree with them. An example is redundant or not very, advertising that is not related to the content for which the reader came. Or imperfections or errors in the design of the pages. Or the desire of the reader to see additional information on the same page. All this leads to the desire to have a mechanism next to the browser that processes some parts of the pages.
At the same time, it is not necessary that the language in which the parser of advertising inserts was written was Javascript. The ad blocker language was and is declarative and specialized, it remained so in the most famous AdBlock Plus - a blocker that was formed already in the era of browser Javascript extensions. At the same time, the blocker program could parse input pages in a proxy server in Python, for example. The main purpose of blockers is to cut parts of the page, most effectively looking for unnecessary, without violating the frame (layout) of the page.
Read more about the contemporary relationship blockers and advertisers (Eng.) - www.computerworld.com/s/article/9245190/Ad_blockers_A_solution_or_a_problem_ .
Custom styles
Another class of page impact ideas is page modification. since CSS rules affect the display to a large extent, the next idea came up - to mix your user rules into many CSS rules. By the way, they can partially perform tasks on hiding unnecessary blocks, although not as efficiently as HTML cutters. But they have a plus in the fact that style rules continue to affect the page even when dynamically modifying the DOM (structure of page elements), which is becoming more and more typical in recent years, starting around the borders of 2008-2009. In addition, style modifiers perform not only a destructive, but also a design role, can refine or simply change the original style of pages.
It is easy to mix styles through the inclusion of CSS rules in HTML using the proxy server method.
Custom scripts
Again, there is no reason to refuse proxies for scripting. After all, user scripts actually started at the moment the web page was finished loading, and this was worse than the introduction of tags with scripts included, because all the other tags with the site scripts had time to start and execute. If desired, the site script could counteract user scripts more successfully than they could with page scripts. But not a single script was completely suppressed, because each has its own local environment for script variables for its execution. (Compete for common resources like Global Scope and DOM, rewrite them - yes, any of these scripts can.)
Another argument in favor of including proxies against user scripts is universality for various browsers. It is easy to accustom any browser to working with a proxy server, but not all browsers at first had a mechanism for implementing user scripts in their arsenal. It is interesting that pretty soon all new browsers considered it their duty to have similar implementation mechanisms and supported the Greasemonkey functions, which became the de facto standard, except for browsers of the IE family, but they also had ways to implement user scripts using third-party programs. True, IE for a long time, before version IE9, had a very different way of working with the DOM at the Javascript level, which determined its isolation from the mainstream development of browsers. In IE11, browser developers have tried to minimize these differences. But the problem remains in reaching users by platform (operating system). IE11 can only be installed or comes initially with windows 8 (from June 2013) and Windows 7 (from November 2013). Users of other operating systems can not even install this browser, except for the use of virtual machines. Therefore, the number of potential users of the browser and user scripts in it is greatly limited by the distribution policy.
A similar situation with limited distribution has developed with the Safari browser since May 2012, when the latest Safari 5.1 update for Windows was released and then it did not develop on this system and the rest, except for Mac OS. But up to this point, developers could count on a fairly large coverage of userscripts on Windows and Mac OS platforms.
In Opera 8.0 in April 2005, support for user scripts also appeared , along with Firefox. In contrast, the Opera had no add-ons for a long time, and you had to install scripts manually (create a script file) and through the browser settings.
In addition, it must be said that users of user scripts, user styles, and proxy servers were quite few in relation to the total number of site visitors. For the most part, these technologies are made by geeks for geeks, and the relative ease of installing scripts through Greasemonkey is itself a great and atypical achievement.
The problem is not only that scripts bring an additional danger of access to user data. The first problem is that convincing the user to make unnecessary movement and installing the add-in program is a difficult task, which can be done for about 1-5% of the total number of users of any site. Basically, after all, the owners of the sites tried to make them user-friendly, so there was not often a strong need for a change in functions and design.
Even the add-ons discussed below, which were able to reduce the installation distance to 2 clicks, could not and will not be able to solve the problem of user trust in extraneous add-ons. All add-ons will remain marginal as long as there is a trustworthy site owner. And if there is no trust, another site with a different owner, causing confidence, will appear on the Internet rather than someone massively “saving” the first site, wholly depending on the donor site.
Browser Addons
User scripts that run after page scripts are run do not always suit (a few of them) users. The page script managed to do something unnecessary, spoil the look, flicker with a banner, and generally spend the processor time on its execution. Therefore, Firefox, starting with versions 0.X, had an initial approach to the idea of building a system of plugins that are easier to write than IE plugins and than the plugins of Firefox itself that have not disappeared. If the task allows us to limit ourselves to a smaller range of technologies than knowing the entire structure of the browser, then it was solved within the framework of building an add-on (add-on) based on XUL technology (XML User Interface Language), made specifically for working with Firefox, the Gecko engine and based on it products.
Over time, this approach was revised, and for Chrome add-ons, which were called "extensions", they no longer invented a new language and technology (similarly to Safari extensions). Everything is built on HTML and Javascript API. Over time, it was necessary to create many similar add-ons, APIs multiply, partially overlapping, in Chrome Apps, Chrome OS, but the approach does not look slow and does not create a specific entry threshold. There is a threshold, but it is determined by the structure of applications as frameworks (for example, you need to know the purpose of the manifest.json file elements) and the number of API functions.
Eventually
As a result, the zoo of browsers did not get a very diverse, which is already good, zoo of add-ons, extensions and scripts.
* Greasemonkey and Scriptish in Firefox - addons.mozilla.org/en-US/firefox
* user scripts in Firefox, Chrome, Opera and Safari (with NinjaKit) - userscripts.org
* extensions of the old Opera; of the new Opera - addons.opera.com/en/extensions
* Chrome extensions - chrome.google.com/webstore/category/extensions
* Chrome applications - chrome.google.com/webstore/category/apps
* Safari extensions - extensions.apple. com
You can recall, already in the past tense, about extensions of the old Opera, which were relatively few, but they were quite simple at the level of complexity of the Safari and Chrome extensions. New extensions for the new Opera,
In percentage terms, the branch of Chrome extensions is most actively developing. This is the most popular and fastest browser that works everywhere, a well-developed and flexible API, and ease of access to it.
As examples, many extensions can be cited, some of which were made specifically for the Habrahabr site and focused primarily over Chrome over the past 2 years.
Theory:
- Translate Chrome extension to manifest_version 2 , utf , August 21, 2012
- Userscripts We pack a user script for Chrome , @ MrMig, October 14, 2011
- Access JavaScript web pages from an extension for Chrome , Houston , July 16, 2013
- Writing an extension for Google Chrome (and publishing it) , paththeir , February 26, 2013
On the subject of Habr:
- Chrome HabraMail Extension (and favicon method) , donnerjack13589 , February 24, 2010
- Google Chrome Extension Habrahabr.ru-Tools-PATCHED , Goder , October 13, 2011 (and two more, but the author is read-only)
- Google Chrome Extension: We publish articles from habrahabr , Bookin, March 5, 2012
- Karma extension for Google Chrome , 404tesla , September 23, 2012
Others:
- Chrome extension over the weekend , brukva , January 10, 2014
- We work with the VKontakte API from the extension for Google Chrome , crea7or , February 27, 2013
- Google Chrome Extensions: Making Hot Keys , UZER2006 , March 5, 2013
- The story of one Google Chrome extension , mamchyts , October 26, 2013
UPD 10/18/2014: the hub was renamed to "Extensions for browsers", as was proposed almost initially . A few months is a good reaction period, it is constantly being reduced.