Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Updated documentation to reflect latest changes debfdae
Browse files Browse the repository at this point in the history
  • Loading branch information
AptiviCEO committed Oct 29, 2023
1 parent 6b34152 commit aae8100
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 54 deletions.
2 changes: 0 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"sitemap": {
"baseUrl": "https://aptivi.github.io/Uname.NET/"
},
"homepages": [],
"source_base_path": "/github/workspace/DocGen",
"xrefmap": "xrefmap.yml",
"files": [
Expand Down Expand Up @@ -75,7 +74,6 @@
"version": ""
}
],
"version_info": {},
"groups": [
{
"xrefmap": "xrefmap.yml"
Expand Down
8 changes: 4 additions & 4 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://aptivi.github.io/Uname.NET/api/UnameNET.UnameManager.html</loc>
<lastmod>2023-09-12T06:43:25+00:00</lastmod>
<lastmod>2023-10-29T11:18:58+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://aptivi.github.io/Uname.NET/api/UnameNET.UnameTypes.html</loc>
<lastmod>2023-09-12T06:43:25+00:00</lastmod>
<lastmod>2023-10-29T11:18:58+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://aptivi.github.io/Uname.NET/api/UnameNET.html</loc>
<lastmod>2023-09-12T06:43:25+00:00</lastmod>
<lastmod>2023-10-29T11:18:58+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://aptivi.github.io/Uname.NET/index.html</loc>
<lastmod>2023-09-12T06:43:25+00:00</lastmod>
<lastmod>2023-10-29T11:18:58+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
Expand Down
57 changes: 9 additions & 48 deletions styles/docfx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -252,7 +213,7 @@ $(function () {

$('#search-query').keyup(function () {
query = $(this).val();
if (query.length < 3) {
if (query === '') {
flipContents("show");
} else {
flipContents("hide");
Expand Down

0 comments on commit aae8100

Please sign in to comment.