Overview

ClickToGif

ClickToGif is an extension for Google Chrome. This extension replaces all occurences of GIF images in web pages with a "No GIF" image. Each occurence of the No GIF image can be clicked to reveal the original GIF. The extension also supports showing all replaced images and whitelisting pages.

Usage

By default, the extension blocks all GIFs on all pages. After a page has loaded, the extension waits two seconds and then replaces any found GIF images.

If a page is not whitelisted, a URL bar button will be present. This button can be clicked to show a menu with two options:

  1. "Show All": shows all original images on the page
  2. "Whitelist Site": adds the current web site to the whitelist

Note: the whitelist must be enabled via the extension settings before it will take effect.

Settings

The "Save Options" button must be pressed before any changes will be committed.

Delay Time

The "Delay Time" setting adjusts how long, in seconds, the extension will wait after a page has loaded before processing it for GIFs. This value ranges from 0 to 15 seconds; it defaults to 2 seconds.

Deep Scan

The "Deep Scan" setting enables, or disables (the default), a more robust scanning method. The default scanning method simply looks for img elements with a src value ending in ".gif". Enabling the deep scan will cause the extension to download the first 64 bytes of each img in the page to verify the image header. This is useful on sites like Google+ where all img elements claim to be JPEG files.

This setting is either enabled for all pages or disabled for all pages. The nature of this setting means extra bandwidth will be used and extra processing time. Thus, you should only enable this setting if you are seeing GIFs when you know the extension should be hiding them.

Whitelist

The "Enable Whitelist" setting turns on whitelisting for the extension. Any site added to the whitelist will not be parsed by the extension. Sites can be added to the whitelist via the form shown in the options after enabling the whitelist, or via the URL bar button menu.

The algorithm used by the whitelist is very simple: if the URL being requested matches any item in the whitelist then the extension will not parse that page (not even the URL bar button will be shown). For example, if you have "example.com" in your whitelist, then "http://foo.example.com/index.html" and "http://example.com/foo/index.html" are considered whitelisted.

License

The MIT License (MIT) Copyright (c) 2013 James Sumners

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.