diff --git a/manifest.json b/manifest.json index e6f3597..117b12e 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,6 @@ "sitemap": { "baseUrl": "https://aptivi.github.io/Uname.NET/" }, - "homepages": [], "source_base_path": "/github/workspace/DocGen", "xrefmap": "xrefmap.yml", "files": [ @@ -75,7 +74,6 @@ "version": "" } ], - "version_info": {}, "groups": [ { "xrefmap": "xrefmap.yml" diff --git a/sitemap.xml b/sitemap.xml index 013ff46..c98dbdf 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,25 +2,25 @@ https://aptivi.github.io/Uname.NET/api/UnameNET.UnameManager.html - 2023-09-12T06:43:25+00:00 + 2023-10-29T11:18:58+00:00 daily 0.5 https://aptivi.github.io/Uname.NET/api/UnameNET.UnameTypes.html - 2023-09-12T06:43:25+00:00 + 2023-10-29T11:18:58+00:00 daily 0.5 https://aptivi.github.io/Uname.NET/api/UnameNET.html - 2023-09-12T06:43:25+00:00 + 2023-10-29T11:18:58+00:00 daily 0.5 https://aptivi.github.io/Uname.NET/index.html - 2023-09-12T06:43:25+00:00 + 2023-10-29T11:18:58+00:00 daily 0.5 diff --git a/styles/docfx.js b/styles/docfx.js index e59f0eb..52ad9c8 100644 --- a/styles/docfx.js +++ b/styles/docfx.js @@ -128,13 +128,10 @@ $(function () { return; } try { - var worker = new Worker(relHref + 'styles/search-worker.min.js'); - if (!worker && !window.worker) { - localSearch(); - } else { - webWorkerSearch(); + if(!window.Worker){ + return; } - + webWorkerSearch(); renderSearchBox(); highlightKeywords(); addSearchEvent(); @@ -164,50 +161,14 @@ $(function () { } } - // Search factory - function localSearch() { - console.log("using local search"); - var lunrIndex = lunr(function () { - this.ref('href'); - this.field('title', { boost: 50 }); - this.field('keywords', { boost: 20 }); - }); - lunr.tokenizer.seperator = /[\s\-\.]+/; - var searchData = {}; - var searchDataRequest = new XMLHttpRequest(); - - var indexPath = relHref + "index.json"; - if (indexPath) { - searchDataRequest.open('GET', indexPath); - searchDataRequest.onload = function () { - if (this.status != 200) { - return; - } - searchData = JSON.parse(this.responseText); - for (var prop in searchData) { - if (searchData.hasOwnProperty(prop)) { - lunrIndex.add(searchData[prop]); - } - } - } - searchDataRequest.send(); - } - - $("body").bind("queryReady", function () { - var hits = lunrIndex.search(query); - var results = []; - hits.forEach(function (hit) { - var item = searchData[hit.ref]; - results.push({ 'href': item.href, 'title': item.title, 'keywords': item.keywords }); - }); - handleSearchResults(results); - }); - } - function webWorkerSearch() { - console.log("using Web Worker"); var indexReady = $.Deferred(); + var worker = new Worker(relHref + 'styles/search-worker.min.js'); + worker.onerror = function (oEvent) { + console.error('Error occurred at search-worker. message: ' + oEvent.message); + } + worker.onmessage = function (oEvent) { switch (oEvent.data.e) { case 'index-ready': @@ -252,7 +213,7 @@ $(function () { $('#search-query').keyup(function () { query = $(this).val(); - if (query.length < 3) { + if (query === '') { flipContents("show"); } else { flipContents("hide");