Archived Comments (locked)

in
Subscribe to Archived Comments 11 posts, 7 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
aatiis User

Also, as Sanja said, the Bosnian and the Croatian are the same, but NOT the same as Serbian. Google Bosnia is not Cyrillic.

 
aatiis User

It seems to me that the Serbian translation is inaccurate (actually it seems to be Croatian).

case "hr": // Croatian
text = ["Svi tipovi slika", "Lica", "Vijesti"];
case "sr": // Serbian; contributed by ferjah, corrected by sanja
text = ["Svi tipovi slika", "Lica", "Vesti"];

Actually, the Serbian Google displays text in Cyrillic, so it should be:

text = ["Сви типови слика", "Лица", "Вести"];

 
TheGreekSage Scriptwright

Very Nice script
although the greek translation is not appropriate.
The word "Faces" it's translated to something overly cute like "Little Funny Faces" (Φατσούλες)

The translation of the other 2 terms "All Image types" and "News" it's not the best either.

I tried to change it but I have trouble with the "JavaScript escape" codes...

You could do a similar script for the main Search page of Google with the &as_qdr= parameter and the Date (Anytime/past 24h) etc. and the Languages.

 
SteeLx Scriptwright

this is really a useful script.. hope they can add more addon that can helps to find "different resolution images search Option"

:)

thanks for a gr8 script.

 
alto maltés Scriptwright

Wonderful, thanks :)

 
LouCypher Script's Author

Thanks again, Ed.

 
alto maltés Scriptwright

You’re welcome. http://google.*/images?* is the page it goes to when I search for images from the Google Toolbar.

Thanks for adding the Maltese translation… but I think you must have pasted it into a non-Unicode editor, because the ċ and ħ are no more. It should be:

case "mt":  // Maltese
  text = ["Kull tip ta’ stampa", "U\u010bu\u0127", "A\u0127barijiet"];
  break;

Thanks again :)

 
LouCypher Script's Author

Thanks Edward. I didn't know you can search for images from other Google sub-domain. I didn't add http://google.*/images?* to @include though, because it will redirect you to www anyway.

 
alto maltés Scriptwright

Great script! Thanks.

How about adding…
// @include http://google.*/images?*
// @include http://*.google.*/images?*

… to the metadata?

 
George Scriptwright

Very cool. I wonder why Google hasn't modified their page themselves.

Here is a version that also offers the image type choice at the opening page of Google Image Search.

// ==UserScript==
// @name            Google Image Type Recognition
// @namespace       http://loucypher.wordpress.com/
// @include         http://images.google.*/*
// @description     Adds image type selections to Google Image search
// ==/UserScript==

// Last updated: 2007-07-09

(function() {
  var doc = typeof unsafeWindow == "object" ? unsafeWindow.document : document;
  var form = doc.gs;
  if (!form) {
      modifyFrontDoor();
      return;
  }

  var yellowbar = document.evaluate("//span[contains(@style, " +
                                    "'rgb(255, 255, 153)')]/parent::center",
                                    document, null, 0, null).iterateNext();
  if (yellowbar) yellowbar.parentNode.removeChild(yellowbar);

  var imgtype;
  if (form.imgtype != undefined) {
    imgtype = form.imgtype.value;
  } else {
    try {
      imgtype = location.href.match(/imgtype\=(\w+)/)[1];
    } catch(ex) {
      imgtype = "";
    }
    var inp = form.appendChild(document.createElement("input"));
    inp.type = "hidden";
    inp.name = "imgtype";
    inp.value = imgtype;
  }

  var elm = document.getElementsByName("imagesize")[0] ||
            document.getElementById("sd");
  if (!elm) return;
  var bluebar = elm.parentNode;

  var menu = makeMenu(form.hl.value);
  bluebar.appendChild(menu);
  menu.style.margin = "2px 0pt";
  menu.addEventListener("change", function(e) {
    form.imgtype.value = this.options[this.selectedIndex].value;
    form.submit();
  }, false);

  function makeMenu(language)
  {
      var menu = document.createElement('select');
      menu.name = "imgtype";

      var text;

      switch (language) {
        case "id":  // Indonesian
        case "ms":  // Malay; merge with ID til I get the translations
          text = ["Semua jenis gambar", "Wajah", "Berita"];
          break;

        case "jw":  // Javanese
          text = ["Sedoyo jenis gambar", "Wajah", "Kabar"];
          break;

        case "su":  // Sundanese
          text = ["Sakab\u00e9h jenis gambar", "Muka", "Beja"];
          break;

        case "nl":  // Dutch; contrib. by Deathstar-NL
          text = ["Alle afbeelding types", "Gezichten", "Nieuws"];
          break;

        case "fr":  // French; contrib. by Mortimer
          text = ["Tous les types d\'image", "Figures", "Actualit�s"];
          break;

        case "de":  // German
          text = ["alle Bildarten", "Gesichter", "Nachrichten"];
          break;

        case "it":  // Italian
          text = ["Tutti i tipi di immagine", "Facce", "Notizie"];
          break;

        case "eu":  // Basque; -----+
        case "ca":  // Catalan;     +-- merge with ES til I get the translations
        case "gl":  // Galician; ---+
        case "es":  // Spanish
          text = ["Todos los tipos de la imagen", "Caras", "Noticias"];
          break;

        case "pt-BR":  // Portuguese (Brazil); contrib. by Bruno 'ReX' Barbieri
          text = ["Todos tipos de imagem", "Rostos", "Not�cias"];
          break;

        case "pt-PT":  // Portuguese (Portugal); contrib. by vOidSenses
          text = ["Todos os tipos da imagem", "Caras", "Noticia"];
          break;

        case "xx-elmer":  // Elmer Fudd; contrib. by himself
          text = ["Aww image types", "Faces", "News"];
          break;

        case "xx-piglatin":  // Pig Latin; contrib. by Arcusmay Ulliustay Icerocay
          text = ["Allay imageway ypestay", "Acesfay", "Ewsnay"];
          break;

        case "xx-hacker":  // Hacker; contrib. by 4(1|)|3|_||2|\|
          text = ["4|| 1/\\/\\463 +yP3z", "P|-|4(3z", "|\\|3\\/\\/5"];
          break;

        case "th":  // Thai; contrib. by tz
          text = ["\u0e17\u0e38\u0e01\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e",
                  "\u0e43\u0e1a\u0e2b\u0e19\u0e49\u0e32",
                  "\u0e02\u0e48\u0e32\u0e27"];
          break;

        case "fi":  // Finnish; contrib. by kenmooda
          text = ["Kaikki kuvatyypit", "Kasvokuvat", "Uutiskuvat"];
          break;

        case "af":  // Afrikaans
        case "sq":  // Albanian
        case "am":  // Amharic
        case "ar":  // Arabic
        case "hy":  // Armenian
        case "az":  // Azerbaijani
        case "be":  // Belarusian
        case "bn":  // Bengali
        case "bh":  // Bihari
        case "xx-bork":  // Bork, bork, bork!
        case "bs":  // Bosnian
        case "br":  // Breton
        case "bg":  // Bulgarian
        case "km":  // Cambodian
        case "zh-CN":  // Chinese (Simplified)
        case "zh-TW":  // Chinese (Traditional)
        case "co":  // Corsican
        case "hr":  // Croatian
        case "cs":  // Czech
        case "da":  // Danish
        case "eo":  // Esperanto
        case "et":  // Estonian
        case "fo":  // Faroese
        case "tl":  // Filipino
        case "fy":  // Frisian
        case "ka":  // Georgian
        case "el":  // Greek
        case "gn":  // Guarani
        case "gu":  // Gujarati
        case "iw":  // Hebrew
        case "hi":  // Hindi
        case "hu":  // Hungarian
        case "is":  // Icelandic
        case "ia":  // Interlingua
        case "ga":  // Irish
        case "ja":  // Japanese
        case "kn":  // Kannada
        case "kk":  // Kazakh
        case "xx-klingon":  // Klingon
        case "ko":  // Korean
        case "ku":  // Kurdish
        case "ky":  // Kyrgyz
        case "lo":  // Laothian
        case "la":  // Latin
        case "lv":  // Latvian
        case "ln":  // Lingala
        case "lt":  // Lithuanian
        case "mk":  // Macedonian
        case "ml":  // Malayalam
        case "mt":  // Maltese
        case "mr":  // Marathi
        case "mo":  // Moldavian
        case "mn":  // Mongolian
        case "ne":  // Nepali
        case "no":  // Norwegian
        case "nn":  // Norwegian (Nynorsk)
        case "oc":  // Occitan
        case "or":  // Oriya
        case "ps":  // Pashto
        case "fa":  // Persian
        case "pl":  // Polish
        case "pa":  // Punjabi
        case "qu":  // Quechua
        case "ro":  // Romanian
        case "rm":  // Romansh
        case "ru":  // Russian
        case "gd":  // Scots Gaelic
        case "sr":  // Serbian
        case "sh":  // Serbo-Croatian
        case "st":  // Sesotho
        case "sn":  // Shona
        case "sd":  // Sindhi
        case "si":  // Sinhalese
        case "sk":  // Slovak
        case "sl":  // Slovenian
        case "so":  // Somali
        case "sw":  // Swahili
        case "sv":  // Swedish
        case "tg":  // Tajik
        case "ta":  // Tamil
        case "tt":  // Tatar
        case "te":  // Telugu
        case "ti":  // Tigrinya
        case "to":  // Tonga
        case "tr":  // Turkish
        case "tk":  // Turkmen
        case "tw":  // Twi
        case "ug":  // Uighur
        case "uk":  // Ukrainian
        case "ur":  // Urdu
        case "uz":  // Uzbek
        case "vi":  // Vietnamese
        case "cy":  // Welsh
        case "xh":  // Xhosa
        case "yi":  // Yiddish
        case "yo":  // Yoruba
        case "zu":  // Zulu
        case "en":  // English
        default:
          text = ["All image types", "Faces", "News"];
      }

      var opt, values = ["", "face", "news"];

      for (var i in values) {
        opt = menu.appendChild(document.createElement("option"));
        opt.appendChild(document.createTextNode(text[i]));
        opt.value = values[i];
        if (values[i] == imgtype) {
          opt.selected = true;
        }
      }
      return menu;
  }

  function modifyFrontDoor()
  {
      var form = doc.f;
      if (!form)
          return;
      var button = form.btnG;
      if (!button)
          return;
      var menu = makeMenu(form.hl.value);
      menu.style.marginRight = '3px';
      button.parentNode.insertBefore(menu, button);
  }

})()

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel