De-jquery the javascript
This commit is contained in:
parent
836a71b2d0
commit
867c19f97c
3 changed files with 22 additions and 23 deletions
|
@ -34,13 +34,6 @@
|
|||
{{end}}
|
||||
|
||||
<div class="col">
|
||||
<script type="text/javascript">
|
||||
function resizeIframe() {
|
||||
var contentHeight = $("#bookContent").contents().find("html").height();
|
||||
$("#bookContent").height(ContentHeight);
|
||||
}
|
||||
</script>
|
||||
|
||||
{{if not .Book.Active}}
|
||||
<div class="text-center">
|
||||
<p class="badge bg-warning">waiting for moderation</p>
|
||||
|
@ -60,7 +53,7 @@
|
|||
</ul>
|
||||
</nav>
|
||||
|
||||
<iframe id="bookContent" onload="resizeIframe();" style="width: 100%; height: 1080px; border: 0;" scrolling="auto" src="{{.Content}}" seamless="seamless" sandbox="allow-same-origin" frameborder=0></iframe>
|
||||
<iframe id="bookContent" scrolling="auto" src="{{.Content}}" seamless="seamless" sandbox="allow-same-origin" frameborder=0></iframe>
|
||||
|
||||
<nav class="d-flex justify-content-center" arial-label="Book navigation">
|
||||
<ul class="pagination">
|
||||
|
@ -80,5 +73,11 @@
|
|||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var bookContent = document.getElementById("bookContent");
|
||||
bookContent.onload = function() {
|
||||
bookContent.style.height = bookContent.contentWindow.document.body.scrollHeight + "px";
|
||||
}
|
||||
</script>
|
||||
|
||||
{{template "footer.html" .S}}
|
||||
|
|
Reference in a new issue