The article describes a practical example of removing long shadows from icons using user styles or user scripts. There are links to working on sites (habrastorage.org, toster.ru, tmtm.ru) styles and scripts. UPD 05/31/2014: styles added on habr.ru and freelansim.ru. Download here - find among files, select Raw, direct link.
Newcomers (long shadows) appeared on the outskirts of our city. If you imagine their height in the rays of the setting sun, consciousness refuses to build this picture.
Aliens must be removed, otherwise our world will forever become a different, unnaturally embossed. (“Toaster” is no longer our territory, so you don’t need to worry much about it. There may be long shadows, as well as arbitrary quality questions and answers.) Now, 2 mutants require reorganization - the Habrastorage logo and drawing clouds.

What are the dangerous long shadows?
Looking at unlimited long shadows, the reader has no tangible idea of ​​the height of the light source above the horizon and the height of the figured objects. As a rule, long shadow mutants coexist with flat interface elements, which leads to the idea of ​​2 kinds of objects - flat (drawn) and volume mutants.
')
(thx)
There is no need to sanitize the design of the flat interface, since these are examples of the life of those pages that we have the honor to get into - it is like remaking the world (or the site). But we are obliged to correct the mutation of high shadows - for the sake of 3-dimensionality of Euclidean geometry and preservation of the non-surreal world. If the flat in the 3-dimensional world occurs, then objects with infinite height, casting such long shadows - no.
There is another source of extraterrestrial atmosphere, which you have to touch - this is the authentication page. There are the same mutated letters "T" and "M" on the logos and some mutated icons there. But since the domain of the authorization page is different, it is desirable to separate such an action into a separate user script or browser extension.
Strictly speaking, there are enough user style resources to sanitize the icons. Therefore, we will build a group of user scripts and users styles, which will perform these tasks, and the one chosen for use will be the one that the installed add-ons allow you to use.
How will they work?
The principle is very simple: instead of a picture from the site, a picture (in base64 format) from user scripts or user styles is substituted. There are several such pictures (now there are 5 items in 3 domains).
In total, there are 3 ways to implement, ridding the world of long shadows. The results of all the methods are the same; in the place of mutated drawings, such corrected ones will be observed:


If you have Stylish for Firefox or Chrome installed in your browser, use:
*) ufoCorrect : user-style shadow correction in the authorization page and on Habrastorage.
Applying only the style provides a quick installation of the page layout, without jerking the display during the loading process. In addition, styles do not create security issues - the user does not need to take the risk of trusting the contents of the script, because there are no scripts.
As a bonus, a correction is also available for QA (or as it is there in a new way). However, this resource may not interest some users.
If Stylish is not installed (and there is no desire to install), you can get by with scripts, use:
*) ufoCorrect-script (for installation, choose from the list by name then “Raw”; direct link for installation): user script that does the only action: sets styles (as seen by its code). It does not require stylish installation. Scripts can be set by simple manipulation - by pressing a button in Firefox or dragging a file into the list of Chrome scripts (or a new Opera), or through NinjaKit in Safari.
*) part of the
HabrAjax script. He does not have access to the authorization domain tmtm.ru, so that the user has no questions about what he will do there. Therefore, the shadow on the "TM" on the login page, it does not delete and will not be deleted. But nothing prevents you from simultaneously using 2 scripts or styles - ufoCorrect and HabrAjax.
We add that HabrAjax uses access to the habrastorage.org domain with another important goal - to automate the throwing of images directly through Habr, so its function is not limited to the help of image sanitization.
UPD (2014-05-31): added
freelansim.ru :
And removed the shadow on the new Habré, with compatibility with
ZenComment 4 and
HabrAjax .
At the same time, the script now needs to be taken on
github.com/spmbt/haPages/tree/gh-pages , since the former hosting (
userscripts.org ) has become unavailable to write new scripts since May 17.
UPD2 (2014-06-01):
ufoCorrect users updated - expanded to the same Habr and Freelance.