[:de]“Grafik anzeigen“ im Firefox 11[:en]“View image“ in Firefox 11[:]

[:de]“Grafik anzeigen“ im Firefox 11[:en]“View image“ in Firefox 11[:]

[:de]

Am 13. März ist ja mal wieder ein neuer Firefox rausgekommen, nämlich in der Version 11. Abgesehen davon, dass ich diese wahnwitzig geringen Update-Intervalle total übertrieben finde – es kommt mir vor als hätten wir erst vor ein paar Wochen noch Version 3.6 gehabt – baut Mozilla da mittlerweile mit jeder Version neue „Annoyances“ ein, wie man sie sonst nur von Windows gewohnt ist. :twisted:

Auch in Version 11 gibt es wieder eine völlig überflüssige Neuerung: Wenn man ein Bild mit Rechtsklick → „Grafik anzeigen“ betrachtet, dann wird dieses nun nicht mehr einfach auf weißem Hintergrund an der oberen linken Ecke des Browserfensters angezeigt, sondern auf einem dunklen Hintergrund und in der Mitte des Fensters zentriert. Im ersten Moment dachte ich: „Verdammt, welches blöde Addon hat das denn verbockt?“ Aber dann merkte ich, dass es sich allen Ernstes um ein natives Firefox-„Feature“ handelt.

Obwohl ich mir beim besten Willen nicht vorstellen konnte, dass die Firefox-Entwickler nichts Wichtigeres zu tun haben als solche unbedeutenden Kleinigkeiten zu „verbessern“, versuchte ich, mich nicht aufzuregen. „Ist ja nicht so schlimm“, dachte ich. „Reine Gewöhnungssache. Bald wird es mir vielleicht sogar gefallen.“ Doch dann klickte ich auf ein transparentes PNG!

Dunkles Bild mit transparentem Hintergrund in Firefox 11
Dunkles Bild mit transparentem Hintergrund in Firefox 11

Ist doch klasse, oder? Und so leicht lesbar! ;) Naja, aber ich will mal nicht zu hart mit den Programmierern ins Gericht gehen. Dass Benutzer evtl. auch mal ein dunkles Bild mit transparentem Hintergrund betrachten wollen, ist ein derart unwahrscheinliches Szenario, dass sie es nun wirklich nicht hätten voraussehen können! [Ironie off]

Lösung: Addon oder userContent.css

Jedenfalls suchte ich schnell nach einem Weg, dieses voll ätzende Verhalten wieder loszuwerden. Dabei stieß ich zunächst auf das Addon „Old Default Image Style“, das freundlicherweise jemand allein zu dem Zweck geschrieben hat, diese Idiotie auf einfache und schnelle Weise wieder rückgängig zu machen.
Doch ich selbst wollte für so einen Schwachsinn nicht extra auch noch ein Addon installieren müssen. Also bearbeitete ich stattdessen meine userContent.css so, dass die Bildanzeige wieder wie früher funktioniert. Und das geht so:

  1. auf den Firefox-Button oben links klicken, dann auf „Hilfe“ → „Informationen zur Fehlerbehebung“
  2. den Button „Ordner anzeigen“ klicken
  3. den Ordner „chrome“ öffnen und dort die Datei userContent.css öffnen bzw. erstellen, wenn sie noch nicht existiert
  4. in der Datei folgenden Code hinzufügen:
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document regexp("((.*\\.(png|apng|jpg|jpeg|gif|tiff|bmp))|(^data:image\\/.*))(\\?([^#]*))?(#(.*))?") {

	html > body {
		background-color: #ffffff !important;
	}

	html > body > img:only-child {
		box-shadow: none !important;
		margin: 0 !important;
	}

}

Nach dem Speichern der Datei und einem Neustart von Firefox sollte die Bildanzeige dann wieder wie gewohnt funktionieren. Den Code kann man natürlich noch beliebig anpassen – so habe ich z.B. statt reinem Weiß ein ganz leichtes Grau (#fafafa) als Hintergrundfarbe gewählt. Und wenn einen nur die Farbe gestört, die Zentrierung der Bilder jedoch gefallen hat, dann lässt man einfach die Zeile „margin: 0 !important;“ weg.
Das Ergebnis sind jedenfalls endlich wieder erkennbare transparente Bilder! ;)

Bildanzeige nach Bearbeitung der userChrome.css
Bildanzeige nach Bearbeitung der userChrome.css
[:en]

On March 13, a new Firefox version came out once again, namely version 11. Apart from the fact that I find their insanely small update intervals completely over the top – to me it seems like version 3.6 was only a few weeks ago – Mozilla now started to build in new „Annoyances“ with each release, in a somewhat Windows-like manner. :twisted:

In version 11 there is again a totally unnecessary feature: If you look at a picture via right click → „View image“, it is no longer displayed on a white background at the upper left corner of the browser window, but on a dark background and centered in the middle of the window. At first I thought, „Damn, which of my stupid addons is screwing up here?“ But then I realized that this was, in all seriousness, a native Firefox „feature“.

Although I could not for the life of me imagine that the Firefox developers don’t have anything more important to do than to „improve“ such details, I tried to stay calm. „It’s not that bad“, I thought. „Pure matter of habit. I might even like it soon.“ But then I clicked on a transparent PNG!

Dark image with transparent background in Firefox 11
Dark image with transparent background in Firefox 11

Great, isn’t it? And so easy to read! ;) But well, I don’t want to be hard on the programmers. Users wanting to look at a dark image with transparent background is such an unlikely scenario, they really could not have foreseen it! [Irony off]

Solution: Addon or userContent.css

Anyway, I quickly looked for a way to get rid of this totally awful behavior. First I stumbled across the addon „Old Default Image Style„, which someone kindly wrote for the sole purpose of undoing this idiocy in a simple and quick way.
But I personally didn’t even want to install an addon for such a rubbish. So I edited my userContent.css instead, so that the image display behaves the way it did before. Here’s how:

  1. click the Firefox button in the upper left, then click „Help“ → „Troubleshooting Information“
  2. the click the button „View folder“
  3. open the folder „chrome“, then open the file userContent.css or create it, if it doesn’t exist
  4. add the following code to the file:
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document regexp("((.*\\.(png|apng|jpg|jpeg|gif|tiff|bmp))|(^data:image\\/.*))(\\?([^#]*))?(#(.*))?") {

	html > body {
		background-color: #ffffff !important;
	}

	html > body > img:only-child {
		box-shadow: none !important;
		margin: 0 !important;
	}

}

After saving the file and restarting Firefox, the image display should work as usual again. The code can be customized as desired, of course – for example, I chose a very light gray (#fafafa) as the background color instead of pure white. And if only the color bothered you, but not the centering of the image, you can simply leave out the line „margin: 0 !important;“.
As a result, transparent images will finally be recognizable again! ;)

Image display after editing userChrome.css
Image display after editing userChrome.css
[:]

2 Antworten zu “[:de]“Grafik anzeigen“ im Firefox 11[:en]“View image“ in Firefox 11[:]”

  1. Danke für den Tipp. Den regulären Ausdruck hätte ich nie so hinbekommen. Für mich als Grafikdesigner ist wichtig zu sehen, ob ein Bild Transparenzen enthält. Deswegen habe ich mir als Bildhintergrund ein Schachbrettmuster erzeugt, also:

    html > body > img:only-child {
    background-color: #ddd !important;
    background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb),
    linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb) !important;
    background-size:20px 20px !important;
    background-position:0 0, 10px 10px !important;}

    Für deinen Zweck (Lesbarkeit) wahrscheinlich nicht optimal. Ich erkenne dadurch aber gut, ob ein Bildhintergrund durchsichtig oder weiß ist.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.