Vimperator DuckDuckGo Tile Hints

Enables Vimperator to identify DuckDuckGo tiles (e.g. image or video tiles) as something that should be hinted.

Från och med 2015-02-06. Se den senaste versionen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// License (WTFPL): http://www.wtfpl.net/

// ==UserScript==
// @name           Vimperator DuckDuckGo Tile Hints
// @version        0.1
// @description    Enables Vimperator to identify DuckDuckGo tiles (e.g. image or video tiles) as something that should be hinted.
// @license        WTFPL
// @namespace      https://greasyfork.org/en/users/8929-skoogit
// @include        https://duckduckgo.com/*
// @grant          none
// ==/UserScript==

// Trigger function when content is inserted into the div that wraps around all tiles
document.getElementById('zero_click_wrapper').addEventListener("DOMNodeInserted", function()
{
    // Set a dummy onclick attribute to every tile
    // This enables Vimperator to identify the tiles as something that should be hinted
    var tiles = document.getElementsByClassName('tile');
    for (i=0; i < tiles.length; i++)
        tiles[i].setAttribute('onclick', 'javascript:void();');
});