需要先display iframe才可以加载

This commit is contained in:
呆瓜云 2023-07-31 15:15:30 +08:00
parent 8248f49fcf
commit f32f4d3bec
1 changed files with 2 additions and 3 deletions

View File

@ -28,7 +28,6 @@ h1 {display:flex;}
.title-right button{margin-left:8px;padding:16px;} .title-right button{margin-left:8px;padding:16px;}
.SideNav{min-width: 360px;} .SideNav{min-width: 360px;}
.SideNav-icon{margin-right: 16px} .SideNav-icon{margin-right: 16px}
.comments{border-top: 2px solid var(--color-border-default);margin-top:64px;}
.footer {margin: 40px auto; text-align: center;font-size: small;} .footer {margin: 40px auto; text-align: center;font-size: small;}
#cmButton{height:48px;margin-top:48px;} #cmButton{height:48px;margin-top:48px;}
</style> </style>
@ -48,7 +47,7 @@ h1 {display:flex;}
<div id="postBody"></div> <div id="postBody"></div>
<button class="btn btn-block" type="button" onclick="openComments()" id="cmButton"> </button> <button class="btn btn-block" type="button" onclick="openComments()" id="cmButton"> </button>
<div class="comments" style="display:none;" id="comments"></div> <div class="comments" id="comments"></div>
<div class="footer">Copyright © <span id="year"></span> <a id="footerblogTitle" href=""></a> <p><span id="filingNum"></span><span id="runday"></span>Powered by <a href="https://github.com/Meekdai/Gmeek" target="_blank">Gmeek</a></p></div> <div class="footer">Copyright © <span id="year"></span> <a id="footerblogTitle" href=""></a> <p><span id="filingNum"></span><span id="runday"></span>Powered by <a href="https://github.com/Meekdai/Gmeek" target="_blank">Gmeek</a></p></div>
</div> </div>
@ -165,8 +164,8 @@ function iFrameLoading(){
function iFrameOK(){ function iFrameOK(){
utterancesLoad=1; utterancesLoad=1;
int=window.clearInterval(int); int=window.clearInterval(int);
document.getElementById("comments").setAttribute("style","border-top: 2px solid var(--color-border-default);margin-top:64px;");
document.getElementById("cmButton").style.display="none"; document.getElementById("cmButton").style.display="none";
document.getElementById("comments").style.display="block";
console.log("utterances Load OK"); console.log("utterances Load OK");
} }