fix: url in preview

pull/493/head
qkqpttgf 2021-12-22 20:50:54 +08:00 committed by GitHub
parent 4db307d6fe
commit 544035b07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 10 deletions

View File

@ -187,10 +187,10 @@
</path></svg></div> </path></svg></div>
<div style="padding:1px" id="top-div"> <div style="padding:1px" id="top-div">
<!--LoginStart--> <!--LoginStart-->
<a class="login" href="?admin"><ion-icon name="ban-outline"></ion-icon></a><!--onclick="login();"--> <a class="login" href="?admin"><ion-icon name="add-circle-outline"></ion-icon></a><!--onclick="login();"-->
<!--LoginEnd--> <!--LoginEnd-->
<!--AdminStart--> <!--AdminStart-->
<li class="operate" id="opflow"><ion-icon name="ban-outline"></ion-icon><ul> <li class="operate" id="opflow"><ion-icon name="add-circle-outline"></ion-icon><ul>
<!--IsFolderStart--> <!--IsFolderStart-->
<li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle-outline"></ion-icon><!--constStr@Create--></a></li> <li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle-outline"></ion-icon><!--constStr@Create--></a></li>
<li><a onclick="showdiv(event,'encrypt','');"><ion-icon name="lock-closed-outline"></ion-icon><!--constStr@Encrypt--></a></li> <li><a onclick="showdiv(event,'encrypt','');"><ion-icon name="lock-closed-outline"></ion-icon><!--constStr@Encrypt--></a></li>
@ -300,7 +300,9 @@
var prePath = strFullPath.substring(0, pos); var prePath = strFullPath.substring(0, pos);
var width = window.innerWidth; var width = window.innerWidth;
// var postPath = strPath.substring(0, strPath.substr(1).indexOf('/') + 1); // var postPath = strPath.substring(0, strPath.substr(1).indexOf('/') + 1);
document.getElementById("url").value= prePath + "<!--FileEncodeUrl-->"; let url = location.href;
url = url.substr(0, url.length-8);
document.getElementById("url").value= url;
// document.getElementById("url").value= prePath + postPath + "<!--FileEncodeUrl-->"; // document.getElementById("url").value= prePath + postPath + "<!--FileEncodeUrl-->";
if(width < 495) { if(width < 495) {
if(document.getElementById("office-a")) { if(document.getElementById("office-a")) {
@ -603,7 +605,7 @@
<!--MdRequireStart--><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4.0.0/github-markdown.min.css"> <!--MdRequireStart--><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4.0.0/github-markdown.min.css">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/marked@2.0.0/lib/marked.min.js"></script><!--MdRequireEnd--> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/marked@2.0.0/lib/marked.min.js"></script><!--MdRequireEnd-->
<!--GuestUploadStart--><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/spark-md5@3.0.1/spark-md5.min.js"></script><!--GuestUploadEnd--> <!--GuestUploadStart--><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/spark-md5@3.0.1/spark-md5.min.js"></script><!--GuestUploadEnd-->
<!--AliyundriveUploadJsStart--><script src="https://cdn.jsdelivr.net/npm/sha1@1.1.1/sha1.min.js"></script><!--AliyundriveUploadJsEnd--> <!--AliyundriveUploadJsStart--><script src="https://cdn.jsdelivr.net/npm/js-sha1@0.6.0/src/sha1.min.js"></script><!--AliyundriveUploadJsEnd-->
<!--IsFileStart--><!--IspdfFileStart--><script src="https://cdn.jsdelivr.net/npm/pdfjs-dist@2.8.335/build/pdf.min.js"></script><!--IspdfFileEnd--><!--IsFileEnd--> <!--IsFileStart--><!--IspdfFileStart--><script src="https://cdn.jsdelivr.net/npm/pdfjs-dist@2.8.335/build/pdf.min.js"></script><!--IspdfFileEnd--><!--IsFileEnd-->
<!--ListEnd--> <!--ListEnd-->
<script type="text/javascript"> <script type="text/javascript">
@ -642,11 +644,6 @@
<!--LoginEnd--> <!--LoginEnd-->
<!--ListStart--> <!--ListStart-->
<!--IsFileStart--> <!--IsFileStart-->
var $url = document.getElementById('url').value;
if ($url) {
$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML;
$url.style.height = $url.scrollHeight + 'px';
}
<!--IsofficeFileStart--> <!--IsofficeFileStart-->
var $officearea=document.getElementById('office-a'); var $officearea=document.getElementById('office-a');
if ($officearea) { if ($officearea) {
@ -1807,6 +1804,6 @@ function size_format(num) {
document.getElementById('password1').focus(); document.getElementById('password1').focus();
<!--EncryptedEnd--> <!--EncryptedEnd-->
</script> </script>
<!--LoginStart--><script src="https://cdn.jsdelivr.net/npm/sha1@1.1.1/sha1.min.js"></script><!--LoginEnd--> <!--LoginStart--><script src="https://cdn.jsdelivr.net/npm/js-sha1@0.6.0/src/sha1.min.js"></script><!--LoginEnd-->
<!--customScript--> <!--customScript-->
</html> </html>