Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loads Wombat and attempts to initialize (not working)
Browse files Browse the repository at this point in the history
Jaifroid committed Nov 13, 2023
1 parent d8333d5 commit 5b2c66c
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
@@ -1731,10 +1731,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);

/**
@@ -1771,10 +1771,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;

0 comments on commit 5b2c66c

Please sign in to comment.