Vimperator DuckDuckGo Tile Hints

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

  1. // License (WTFPL): http://www.wtfpl.net/
  2.  
  3. // ==UserScript==
  4. // @name Vimperator DuckDuckGo Tile Hints
  5. // @version 0.1
  6. // @description Enables Vimperator to identify DuckDuckGo tiles (e.g. image or video tiles) as something that should be hinted.
  7. // @license WTFPL
  8. // @namespace https://gf.qytechs.cn/en/users/8929-skoogit
  9. // @include https://duckduckgo.com/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // Trigger function when content is inserted into the div that wraps around all tiles
  14. document.getElementById('zero_click_wrapper').addEventListener("DOMNodeInserted", function()
  15. {
  16. // Set a dummy onclick attribute to every tile
  17. // This enables Vimperator to identify the tiles as something that should be hinted
  18. var tiles = document.getElementsByClassName('tile');
  19. for (i=0; i < tiles.length; i++)
  20. tiles[i].setAttribute('onclick', 'javascript:void();');
  21. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址