Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependencies needed for warc2zim archive reading #1010

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Loads Wombat and attempts to initialize (not working)
Jaifroid committed Nov 22, 2023
commit 314db0283f106759838a901288684aea06308358
16 changes: 8 additions & 8 deletions www/js/app.js
Original file line number Diff line number Diff line change
@@ -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);

/**
@@ -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;