Browse Source

bug fix: some browser not support string.replaceAll

master
filesite 2 months ago
parent
commit
12882fc25d
  1. 1
      themes/beauty/views/site/index.php
  2. 2
      www/css/beauty.css
  3. 8
      www/js/beauty.js

1
themes/beauty/views/site/index.php

@ -415,6 +415,7 @@ eof; @@ -415,6 +415,7 @@ eof;
data-video-url="{$file['path']}"
alt="{$file['filename']}">
<span class="title">{$title}</span>
<img src="/img/video-play.svg" class="playbtn hide" alt="video play button">
<span class="duration">00:00:00</span>
</a>
</div>

2
www/css/beauty.css

@ -156,7 +156,7 @@ a:link{text-decoration:none} @@ -156,7 +156,7 @@ a:link{text-decoration:none}
.audio-item a{display:block;min-height:60px}
.audio-item img{float:left;width:60px;height:60px}
.audio-item .title{display:block;margin-left:70px}
.audio-item .duration{width:56px;overflow:hidden;margin-left:2px;bottom:4px}
.audio-item .duration{width:52px;overflow:hidden;margin-left:4px;bottom:4px;font-size:11px}
.audioplayer{position:fixed;left:0;right:0;bottom:0;z-index:1000;height:120px;overflow:hidden;background-color:#000}
.audioplayer .videoplayer{max-width:460px;height:120px;overflow:hidden;opacity:0.85}
.audioplayer .downloadbtn{width:96px;margin:81px auto 0 auto}

8
www/js/beauty.js

@ -680,10 +680,10 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') { @@ -680,10 +680,10 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') {
for (var index in videos) {
if (videos[index].id == ignoreId) {continue;}
tmp = template.replace('{videoUrl}', getVideoUrl(videos[index].id, videos[index].path));
tmp = tmp.replaceAll('{title}', videos[index].filename);
tmp = tmp.replaceAll('{videoId}', videos[index].id);
tmp = tmp.replaceAll('{videoPath}', videos[index].path);
tmp = template.replace(/\{videoUrl\}/ig, getVideoUrl(videos[index].id, videos[index].path));
tmp = tmp.replace(/\{title\}/ig, videos[index].filename);
tmp = tmp.replace(/\{videoId\}/ig, videos[index].id);
tmp = tmp.replace(/\{videoPath\}/ig, videos[index].path);
html += tmp;
}

Loading…
Cancel
Save