fix vimium for google search

try to take over the world

  1. // ==UserScript==
  2. // @name fix vimium for google search
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world
  6. // @author xianmua
  7. // @include https://www.google*/search*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. let inputField = document.querySelector('textarea[name=q]'); // replace with the selector for the input field
  16. inputField.addEventListener('focus', function() {
  17. inputField.selectionStart = inputField.selectionEnd = inputField.value.length;
  18. });
  19. })();