tipuesearch_set.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. Tipue Search 2.1
  3. Copyright (c) 2013 Tipue
  4. Tipue Search is released under the MIT License
  5. http://www.tipue.com/search
  6. */
  7. var tipuesearch_stop_words = ["and", "be", "by", "do", "for", "he", "how", "if", "is", "it", "my", "not", "of", "or", "the", "to", "up", "what", "when"];
  8. var tipuesearch_replace = {"words": [
  9. {"word": "tipua", replace_with: "tipue"},
  10. {"word": "javscript", replace_with: "javascript"}
  11. ]};
  12. var tipuesearch_stem = {"words": [
  13. {"word": "e-mail", stem: "email"},
  14. {"word": "javascript", stem: "script"},
  15. {"word": "javascript", stem: "js"}
  16. ]};
  17. var tipuesearch_pages;
  18. function showGetResult()
  19. {
  20. var result = new Array();
  21. var scriptUrl = 'sitemap.xml';
  22. $.ajax({
  23. url: scriptUrl,
  24. type: 'GET',
  25. dataType: 'xml',
  26. async: false,
  27. success: function(xml) {
  28. $(xml).find('url').each(function(){
  29. var loc = $(this).find('loc').text();
  30. result.push(loc);
  31. });
  32. },
  33. error: function() {
  34. alert('An error occurred while processing XML file.');
  35. }
  36. });
  37. return result;
  38. }
  39. var r = showGetResult();
  40. tipuesearch_pages = r;