|
@@ -20,5 +20,29 @@ var tipuesearch_stem = {"words": [
|
|
{"word": "javascript", stem: "js"}
|
|
{"word": "javascript", stem: "js"}
|
|
]};
|
|
]};
|
|
|
|
|
|
-var tipuesearch_pages = ["http://foo.com/", "http://foo.com/about/", "http://foo.com/blog/", "http://foo.com/tos/"];
|
|
|
|
|
|
+var tipuesearch_pages;
|
|
|
|
|
|
|
|
+function showGetResult()
|
|
|
|
+{
|
|
|
|
+ var result = new Array();
|
|
|
|
+ var scriptUrl = 'sitemap.xml';
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: scriptUrl,
|
|
|
|
+ type: 'GET',
|
|
|
|
+ dataType: 'xml',
|
|
|
|
+ async: false,
|
|
|
|
+ success: function(xml) {
|
|
|
|
+ $(xml).find('url').each(function(){
|
|
|
|
+ var loc = $(this).find('loc').text();
|
|
|
|
+ result.push(loc);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ error: function() {
|
|
|
|
+ alert('An error occurred while processing XML file.');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return result;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var r = showGetResult();
|
|
|
|
+tipuesearch_pages = r;
|