fix: url in preview

pull/493/head
qkqpttgf 2021-12-22 20:44:32 +08:00 committed by GitHub
parent 6cbeaa4a09
commit e828fe0a2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -222,7 +222,7 @@
<div style="margin: 12px 4px 4px; text-align: center"> <div style="margin: 12px 4px 4px; text-align: center">
<div style="margin: 24px"> <div style="margin: 24px">
<textarea id="url" title="url" rows="1" style="width: 100%; margin-top: 2px;" readonly><!--FileEncodeUrl--></textarea> <textarea id="url" title="url" rows="1" style="width: 100%; margin-top: 2px;" readonly><!--FileEncodeUrl--></textarea>
<a href="<!--FileUrl-->"><ion-icon name="download" style="line-height: 16px;vertical-align: middle;"></ion-icon>&nbsp;<!--constStr@Download--></a> <a href="<!--FileEncodeUrl-->"><ion-icon name="download" style="line-height: 16px;vertical-align: middle;"></ion-icon>&nbsp;<!--constStr@Download--></a>
</div> </div>
<div style="margin: 24px"> <div style="margin: 24px">
<!--IsimgFileStart--> <!--IsimgFileStart-->
@ -717,7 +717,10 @@ return false;
<!--IsFileStart--> <!--IsFileStart-->
var $url = document.getElementById('url'); var $url = document.getElementById('url');
if ($url) { if ($url) {
$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML; //$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML;
let url = location.href;
url = url.substr(0, url.length-8);
$url.innerHTML = url.replace(/&amp;/g, '&amp;amp;');
$url.style.height = $url.scrollHeight + 'px'; $url.style.height = $url.scrollHeight + 'px';
} }
<!--IsofficeFileStart--> <!--IsofficeFileStart-->