MediaWiki:Search.js

Вы находитесь на сайте "Архив статей из ЭЕЭ и статей на еврейские темы из Википедии"

Перейти к: навигация, поиск

Замечание: Чтобы после сохранения увидеть сделанные изменения, очистите кеш своего браузера: Mozilla / Firefox: Ctrl+Shift+R, IE: Ctrl+F5, Safari: Cmd+Shift+R, Konqueror: F5, Opera: через меню Tools→Preferences.

function searchPage() {
 var searchEngines = {
  'Внутренний поиск': false,
  'Поиск в Википедии': 'http://ru.wikiwix.com/?action=%s&disp=article',
  'Google': 'http://www.google.com/custom?q=%s&hl=ru&domains=www.ejwiki.org;pubs.ejwiki.org&sitesearch=.ejwiki.org',
  'Yahoo': 'http://search.yahoo.com/search?p=%s&vs=www.ejwiki.org',
  'Яндекс': 'http://yandex.ru/yandsearch?text=%s&site=www.ejwiki.org&site_manually=true&ras=1'
  }
 createOption = function(site, engine) {
   var opt = document.createElement('option')
   opt.appendChild(document.createTextNode(site))
   opt.value = site
   return opt
 }
 var searchForm = document.forms['search'] || document.forms['powersearch'] || document.forms['searchform']
 if (searchForm.fulltext) searchForm.fulltext.value = 'Найти'
 submit = function() {
   var optSelected = searchEngines[document.getElementById('searchEngine').value]
   if (optSelected) {
     searchInput = document.getElementById('searchText') || document.getElementById('powerSearchText')
     window.location = optSelected.replace(/%s/g, encodeURIComponent(searchInput.value))
     return false
   }
 }
 if (navigator.appName == 'Microsoft Internet Explorer') addHandler(searchForm, 'submit', submit)
 else searchForm.onsubmit = submit
 var selectBox = document.createElement('select')
 selectBox.id = 'searchEngine'
 for (var se in searchEngines)
    selectBox.appendChild(createOption(se, searchEngines[se]))
 searchInput = document.getElementById('searchText') || document.getElementById('powerSearchText')
 searchInput.parentNode.insertBefore(selectBox, searchInput.nextSibling)
}
 
addOnloadHook(searchPage)
Личные инструменты
 

Шаблон:Ежевика:Рубрики

Навигация