Skip to content

Commit

Permalink
Loads Wombat and attempts to initialize (not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Nov 22, 2023
1 parent 3174a06 commit 314db02
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1761,10 +1761,10 @@ function isDirEntryExpectedToBeDisplayed (dirEntry) {
}

// Import the Wombat script
// var Wombat;
// var wombatScript = document.createElement('script');
// wombatScript.type = 'text/javascript';
// wombatScript.src = document.location.href.replace(/[^/]+$/, '') + 'js/lib/wombat.js';
var Wombat;
var wombatScript = document.createElement('script');
wombatScript.type = 'text/javascript';
wombatScript.src = document.location.href.replace(/[^/]+$/, '') + 'js/lib/wombat.js';
// document.head.appendChild(wombatScript);

/**
Expand Down Expand Up @@ -1806,10 +1806,10 @@ function readArticle (dirEntry) {
document.getElementById('searchingArticles').style.display = 'none';
var doc = iframeArticleContent.contentDocument ? iframeArticleContent.contentDocument : null;
// Insert the Wombat script to rewrite dynamic URLs
// doc.head.appendChild(wombatScript);
// wombatScript.onload = function () {
// iframeArticleContent.contentWindow._WBWombatInit({});
// }
doc.head.appendChild(wombatScript);
wombatScript.onload = function () {
iframeArticleContent.contentWindow._WBWombatInit({});
}
// var innerHtml = iframeArticleContent.contentDocument.documentElement.innerHTML;
// innerHtml = Wombat.rewriteHtml(innerHtml);
// iframeArticleContent.contentDocument.documentElement.innerHTML = innerHtml;
Expand Down

0 comments on commit 314db02

Please sign in to comment.