Fixed videos not playing on pleroma, and fixed saving images after changing image on a local post with caching disabled

This commit is contained in:
Zergling_man 2021-12-03 02:14:15 +11:00
parent 9856c34adc
commit 49016e57e4
2 changed files with 5 additions and 2 deletions

View File

@ -620,7 +620,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
if (media.pleroma && media.pleroma.mime_type.indexOf('video') !== -1) {
viewer =
viewer +
`<a onclick="imgv('${id}','${key2}','${acct_id}')" id="${id}'-image-${key2}"
`<a onclick="imgv('${id}','${key2}','${acct_id}')" id="${id}-image-${key2}"
data-url="${url}" data-type="video" class="img-parsed">
<video src="${purl}" class="${sense} toot-img pointer" style="max-width:100%;" loop="true" alt="attached media">
</a></span>`

View File

@ -47,6 +47,9 @@ function imgCont(type) {
}
var murl = $('#' + id + '-image-' + key).attr('data-url')
var ourl = $('#' + id + '-image-' + key).attr('data-original')
if (!ourl || ourl == 'null') {
ourl = murl
}
var type = $('#' + id + '-image-' + key).attr('data-type')
$('#imagemodal').attr('data-id', id)
$('#imagemodal').attr('data-acct', acct_id)
@ -54,7 +57,7 @@ function imgCont(type) {
$('#imagemodal').attr('data-image', murl)
//表示はリモートを使うか(どちらにしろコピーはオリジナル)
var remote_img = localStorage.getItem('remote_img')
if (remote_img == 'yes' && ourl != 'null') {
if (remote_img == 'yes') {
murl = ourl
}
if (murl) {