Skip to content

Commit

Permalink
Attempt to use base href
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Apr 23, 2023
1 parent 0fc50e1 commit cd24096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<script>
window.addEventListener('message', function(e) {
var html = e.data.html;
html = html.replace(/(<head\b[^>]*>\s*)/, '$1<base href="' + e.data.baseHref + '">');
//html = html.replace(/(<head\b[^>]*>\s*)/, '$1<base href="' + e.data.baseHref + '">');
document.baseURI = e.data.baseHref;
var article = document.getElementById('article');
// if (oldArticle) oldArticle.parentNode.removeChild(oldArticle);
// var article = document.createElement('iframe');
Expand Down

0 comments on commit cd24096

Please sign in to comment.