Please see Gmail *2* small attachment icons by Moktoipas and Gmail - attachment icon replacer by USBman for where this came from as it is simply a combination of the two (i.e., borrowed code). The aim was really to update the latter for the new Gmail interface. Whether you use Windows, Mac, or Linux...this should display the attachment icons native to your system. Hopefully it works for you like it does for me!!
EDIT: As someone noted in the comments below, this may not work with the Better Gmail 2 extension for Firefox. I haven't gotten a chance see this problem first-hand, but just note that it may be a problem.
**UPDATE**
This update includes the code from Stybi (see comments section below).
Hello,
I've updated the style to support signed messages too, added better icons for signed/encrypted mail and added an icon for flash video file.
Please update the style with this code:@-moz-document url-prefix(http://mail.google.com/),
url-prefix(https://mail.google.com/) {/* OFFICE TYPE FILES */
table img[title$=pdf], /* Portable Document Format */
table img[title$=PDF]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.pdf?size=16) !important;
}table img[title$=xls], /* Microsoft Excel */
table img[title$=XLS]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.xls?size=16) !important;
}table img[title$=xlsx], /* Microsoft Excel Open XML */
table img[title$=XLSX]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.xlsx?size=16) !important;
}table img[title$=doc], /* Microsoft Word */
table img[title$=DOC]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.doc?size=16) !important;
}table img[title$=docx], /* Microsoft Word Open XML */
table img[title$=DOCX]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.xlsx?size=16) !important;
}table img[title$=ppt], /* Microsoft Powerpoint */
table img[title$=pps],
table img[title$=PPT],
table img[title$=PPS]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.ppt?size=16) !important;
}table img[title$=pptx], /* Microsoft Excel Open XML */
table img[title$=PPTX],
table img[title$=ppsx],
table img[title$=PPSX]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.pptx?size=16) !important;
}table img[title$=odt], /* OpenOffice Text */
table img[title$=ODT]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.odt?size=16) !important;
}table img[title$=ods], /* OpenOffice Spreadsheet */
table img[title$=ODS]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.ods?size=16) !important;
}table img[title$=odp], /* OpenOffice Presentation */
table img[title$=ODP]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.odp?size=16) !important;
}table img[title$=txt], /* Text */
table img[title$=TXT]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.txt?size=16) !important;
}table img[title$=rtf], /* Rich Text Format */
table img[title$=RTF]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.rtf?size=16) !important;
}/* COMPRESSED ARCHIVES */
table img[title$=zip], /* Compressed Archive */
table img[title$=ZIP]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.zip?size=16) !important;
}table img[title$=rar], /* WinRAR Compressed Archive */
table img[title$=RAR]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.rar?size=16) !important;
}[title*=".7z"], /* 7-zip Compressed Archive */
[title*=".7Z"]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.7z?size=16) !important;
}/* IMAGE FILES */
table img[title$=gif], /* Graphic Interchange Format */
table img[title$=GIF]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.gif?size=16) !important;
}table img[title$=bmp], /* Bitmap */
table img[title$=BMP]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.bmp?size=16) !important;
}table img[title$=jpg], /* Joint Photographic Experts Group image */
table img[title$=JPG],
table img[title$=jpeg],
table img[title$=JPEG]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.jpg?size=16) !important;
}table img[title$=png], /* Portable (Public) Network Graphic */
table img[title$=PNG]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.png?size=16) !important;
}table img[title$=tif], /* Tagged Image Format */
table img[title$=TIF],
table img[title$=tiff],
table img[title$=TIFF]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.png?size=16) !important;
}table img[title$=AI], /* Adobe Illustrator */
table img[title$=ai]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.ai?size=16) !important;
}table img[title$=PSD], /* Adobe Photosphop */
table img[title$=psd]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.psd?size=16) !important;
}/* INTERNET FILES */
table img[title$=html], /* HyperText Markup Language */
table img[title$=htm]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.htm?size=16) !important;
}table img[title$=kmz], /* Google Earth Saved Working Session */
table img[title$=KMZ]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.kmz?size=16) !important;
}table img[title$=kml], /* Google Earth Saved Working Session */
table img[title$=KML]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.kml?size=16) !important;
}table img[title$=java], /* Java */
table img[title$=JAVA],
table img[title$=class],
table img[title$=CLASS]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.java?size=16) !important;
}
table img[title$=JS], /* JavaScript */
table img[title$=js]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.js?size=16) !important;
}table img[title$=CSS], /* Cascading Style Sheet */
table img[title$=css]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.css?size=16) !important;
}/* MEDIA FILES */
table img[title$=mp3], /* MPEG Audio Stream, Layer III */
table img[title$=MP3]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.mp3?size=16) !important;
}table img[title$=flv], /* Flash video */
table img[title$=FLV]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.flv?size=16) !important;
}table img[title$=wma], /* Windows Media Audio */
table img[title$=WMA]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.wma?size=16) !important;
}table img[title$=wmv], /* Windows Media Video */
table img[title$=WMV]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.wmv?size=16) !important;
}table img[title$=wm], /* Windows Media A/V */
table img[title$=WM]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.wm?size=16) !important;
}table img[title$=wme], /* Windows Media Encoder Session Profile */
table img[title$=WME]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.wme?size=16) !important;
}table img[title$=wav], /* Waveform */
table img[title$=WAV]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.wav?size=16) !important;
}table img[title$=mov], /* Quicktime Video */
table img[title$=MOV]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.mov?size=16) !important;
}table img[title$=mpeg], /* MPEG 1 System Stream */
table img[title$=MPEG]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.mpeg?size=16) !important;
}table img[title$=mpg], /* MPEG 1 System Stream */
table img[title$=MPG]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.mpg?size=16) !important;
}table img[title$=mpe], /* MPEG 1 System Stream */
table img[title$=MPE]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.mpe?size=16) !important;
}table img[title$=mp4], /* MPEG 4 System Stream */
table img[title$=MP4]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.mp4?size=16) !important;
}table img[title$=avi], /* Audio Video Interleave File */
table img[title$=AVI]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.avi?size=16) !important;
}table img[title$=divx], /* DivX Movie */
table img[title$=DIVX]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.divx?size=16) !important;
}/* ASSORTED FILES TYPES */
table img[title$=ics], /* iCalendar Calendar Data */
table img[title$=ICS]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.ics?size=16) !important;
}table img[title$=eml], /* Outlook Express Electronic Mail */
table img[title$=EML]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.eml?size=16) !important;
}table img[title$=exe], /* Windows Executable */
table img[title$=EXE]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.exe?size=16) !important;
}table img[title$=msi], /* Windows Installer File */
table img[title$=MSI]
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(moz-icon://.msi?size=16) !important;
}table img[title$=rdf] /* Stylish Extension, Styles Backup */
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gsZCQQHp6sXvgAAArBJREFUeNqNkk1oXFUUx3/nvteZ
l3kdM5mmnYSOJjU0xnZRgsKoKLSIG62CNAQpVZeiGxfiRhFppVCwQl1ZFISiSEWiC0syKriwSLoI
BS1qXVRKmmKaiGPnZd598/HucREndqrQ/jcXDuf+z+98yGsnZq7v3V30uYV+W1yO+vJD9z8/vW/p
hrCw/51fWnobWrz6h35y+ovlk6fmRgAIClmvOHrYXInUWGtpNBrEcUwcxyRJsvFaa7HWkjRbVCqV
km1c+45wWz5bmvgqs3nr934r9cTzPKIoAsAYg3NunU8EgIGBAcrDRZxThgf7t/pbxqq5OwaS2oXZ
r/22iogIxWKx51NXqooqKHBtZZU3jp/MDg6NTjaWfxoH8H1x2mq1pEvQNekapakjdY4oWuPF19+m
FosJgsYH0eKPSwB+xkfDMCQMw/9MXlVxTumkjlffOsHPVyJ23lVy87OnXu7m+BlPsdZSq9UwxiAi
GGM20DtpypHj71Gd/5WJsVGeemC0Mz/7bxE/4wmqSqFQwBjzTwtmg+Dd9z/i028vsPPuHTz7+CQj
5Tt7KE2709RcLkez2cRaSxzH1KOI6/U6c9UqH5/+jPGR7UzvHWd6agpV7TX4/a/YHJtZIJvNEgQB
mWyWtJNQnTtDmOvjlRcOMbXvXqYPHMDaBL1pTv6a5M3Rz88RrJ6n5NVZOPsll384y7bdjzFReYKh
4e08+dAjeJs2/e+J+208do0Pc+abD7lneYaMgdJmKJfLPHPoOUBInZKmDgUU7TkUv9lR6gzx6NMv
UTi3RhDmGXnwIPdVHmZlZRXn1rfhXEqhOMjNPfgGGMz3s3+sjdvxJk6VPXsmSZ0jCPpIneKcw6mS
rpv1EvT7rm6WFv68eLF9XkQMIubSpcsiIgZFEDGyvlcREZMkzc6NBn8DkDtSt7r7s1oAAAAASUVO
RK5CYII=
) !important;
}table img[title$=p7m] /* Encrypted Email (https://addons.mozilla.org/firefox/592/) */
{
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(data:image/gif;base64,
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAKg
AtQDPcVqM8gAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9gMBQ4XFaJXZKYAAAAZdEVYdE
NvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAABbklEQVQ4y42SMUtcQRSFv5kds9gEUgSEN
CmCnegWIT9AEDSNpdiqnbHxD+wiWKVMIJD8BGOwSZdWIYhN/oFIIhixUeO7c+9Mipddfc+3WW8z
3MM9Z+acO45abXY/5XF/xc/TczItsmvx/KlyZpO831p29flQB8b9Ffvfj8CN4XwAHzj5FcAf0VS
+DlhugRtj481699veB7e2utLFB3DhYQLt/BvnA4tzMz2ApdedHi6Ur3mIQIlWh50PuFa7cXQQyt
vPF1miEqMi0W5PVWI0opbY9Y2wu/3K3QvRUmbqxZN/ZEOiIWqV/k+hHP44bragZiPJZS/NAmZpJ
FmioTE2/wOzVCEDvPu4A8DC/CztR4FCdIRA7WaA6c5LAApRCjGixiEWUrpHvluFGCKK6pAXqKaK
58vrMqxnE48H5EKMKMX/t9APrO/9LrkQRWTIFlRTJe2+5wo5GrEmcGvBEl++HpCSkVManDmnCpZ
MKwJ/AQ44VzXwWiNmAAAAAElFTkSuQmCC
) !important;
}table img[title$=p7s] {
width:0px!important;
height:0px!important;
padding-left:15px!important;
padding-top:16px!important;
background-position: top left !important;
background-image:url(data:image/gif;base64,
R0lGODlhEAAQAOeGAG4eG3AiHmolJWwlJYQhEo8fDIMiFnskGnskHYEnHIYnGZElFXMsKHUvLHk
wLHYxLXcxLYQuJY8tHn0zLawpC4UyKIoxJacrEYwzI7gpCbspBY8zJIA7NqI0HJ01JJw3I6Y2HK
Q3HrI2GdIvAcIzEJw9LZ09Lb84FN8yALM8IpVGOYxIQb89G8o7E8xBFOE8DvU5AKhKO5NQSdFEE
4tTUtJFGpBUUdpEGY5VUr5LMOZFF71QN85RMctYHsdYO/ZOGtxWMbVfTfFUJeRdI8JpHOdcNdph
O+heNdplGqhzKOZgOaxzLcpnTM9mTP1cKNhqGudjO7B1Lq92Kd5sSbR7MvtmNtF0QPNrQa+EKuR
xT+N4H/9tPcJ/RcGARf1vRPVxSLGLL/5yR8WAc+B9SOd6WNaAaemBX/x9VeWHaOSKcfuGY/+HYe
eWMuyTd/eVdfWWdOyYfvCYdOaahMynV/yXePaae/+ZedGsT/+fgeOnlPGnjvKnj9i4Ud2+UPXXZ
evXhvnadP7ece7fpP/nh/7wsP7xs///////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////yH+EUNyZW
F0ZWQgd2l0aCBHSU1QACH5BAEKAP8ALAAAAAAQABAAAAi4AP8JHEiwoMF/cMgokXNw4J4ravCcO
cKj4b8vcbosoTJGiJiDbehwwdLnD5ghKQ6asZOEj6BCfrS0kGEQypoocwgNCoREBAeDaYpYkXIH
EJsZG3AczFGjB5EnLjo4aOjDxIcQIDA0YHBwip4mJSY8WBHEA4SCedC4CQMjQ4w3VW4gKGikjhc
nKBYw2fJDxwkAA8tk2SGBxAgLQF4UOHCBAA2BLCrY+GeAQgINCggKEKiC4IAAEQ4GBAA7
) !important;
}}
Thank you for the great script. Makes finding attachments a lot easier in Gmail.
This doesn't work for me :(
I have the "Better GMail 2" extension installed in Firefox, and it offers (crappier) attachment icons. I turned these off, but it looks like it's still over-riding it. A LOT of people use that, so perhaps you want to figure out how to make it compatible!!
Excellent script. I like to use Gmail a lot, but it's been difficult to keep the aesthetic cohesive with the rest of my system. Works well with my Ubuntu distribution.