Google Search - Always Show Image Size

Forces Google Image Search to display sizes for all the images by default.

当前为 2019-04-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Google Search - Always Show Image Size
  3. // @name:fr Google Search - Toujours afficher Taille de l'image
  4. // @name:de Google-Suche - Bildgröße immer anzeigen
  5. // @name:ru Поиск Google - всегда показывать размер изображения
  6. // @name:es Google Búsqueda - Mostrar Siempre Tamaño Imagen
  7. // @description Forces Google Image Search to display sizes for all the images by default.
  8. // @description:fr Force Google Image Search à afficher les tailles de toutes les images.
  9. // @description:de Erzwingt die Anzeige von Größen für alle Bilder durch Google Image Search.
  10. // @description:ru Вынуждает Google Image Search отображать размеры всех изображений.
  11. // @description:es Hace que la Búsqueda de imágenes de Google muestre los tamaños de todas las imágenes.
  12. // @namespace iamMG
  13. // @license MIT
  14. // @version 1.2.1
  15. // @icon https://i.imgur.com/Xy9vHSR.png
  16. // @include /(http|https):\/\/www\.google\.(ca|co\.in|co\.uk|com|com\.br|de|es|fr|it|pl|ru)\/search\?/
  17. // @author iamMG
  18. // @run-at document-start
  19. // @grant none
  20. // @copyright 2019, iamMG (https://openuserjs.org/users/iamMG)
  21. // ==/UserScript==
  22.  
  23. if (/&tbm=isch/.test(location.search) && !/tbs=imgo:1/.test(location.search) && !/&tbs=simg:/.test(location.search)) {
  24. window.location.replace(window.location.protocol + "//" + window.location.host + window.location.pathname + location.search + "&tbs=imgo:1");
  25. }
  26. ///*
  27. document.addEventListener ("DOMContentLoaded", DOM_ContentReady);
  28.  
  29. function DOM_ContentReady () {
  30. document.getElementById('hdtbMenus').classList.add("hdtb-td-c");
  31. document.getElementById('hdtbMenus').classList.remove("hdtb-td-o");
  32. document.getElementById('hdtb-tls').classList.remove("hdtb-tl-sel");
  33. }
  34. //*/