fix quotes format
This commit is contained in:
parent
0159d92f68
commit
248dc80f40
|
|
@ -24,7 +24,7 @@ const SendXMLHttpRequest = (url, data, success, error, fail) => {
|
|||
};
|
||||
|
||||
xhr.open(data !== null ? 'POST' : 'GET', url, true);
|
||||
xhr.setRequestHeader("Content-type", "application/json; charset=UTF-8");
|
||||
xhr.setRequestHeader('Content-type', 'application/json; charset=UTF-8');
|
||||
xhr.send(data !== null ? JSON.stringify(data) : null);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ class Comment {
|
|||
});
|
||||
|
||||
this.player.template.commentColorSettingBox.addEventListener('click', () => {
|
||||
const sele = this.player.template.commentColorSettingBox.querySelector(`input:checked+span`);
|
||||
const sele = this.player.template.commentColorSettingBox.querySelector('input:checked+span');
|
||||
if (sele) {
|
||||
const color = this.player.template.commentColorSettingBox.querySelector(`input:checked`).value;
|
||||
const color = this.player.template.commentColorSettingBox.querySelector('input:checked').value;
|
||||
this.player.template.commentSettingFill.style.fill = color;
|
||||
this.player.template.commentInput.style.color = color;
|
||||
this.player.template.commentSendFill.style.fill = color;
|
||||
|
|
|
|||
|
|
@ -214,8 +214,8 @@ class Danmaku {
|
|||
if (!dan[i].color) {
|
||||
dan[i].color = '#fff';
|
||||
}
|
||||
const item = document.createElement(`div`);
|
||||
item.classList.add(`dplayer-danmaku-item`);
|
||||
const item = document.createElement('div');
|
||||
item.classList.add('dplayer-danmaku-item');
|
||||
item.classList.add(`dplayer-danmaku-${dan[i].type}`);
|
||||
if (dan[i].border) {
|
||||
item.innerHTML = `<span style="border:${dan[i].border}">${dan[i].text}</span>`;
|
||||
|
|
@ -260,7 +260,7 @@ class Danmaku {
|
|||
|
||||
if (tunnel >= 0) {
|
||||
// move
|
||||
item.classList.add(`dplayer-danmaku-move`);
|
||||
item.classList.add('dplayer-danmaku-move');
|
||||
|
||||
// insert
|
||||
docFragment.appendChild(item);
|
||||
|
|
@ -315,12 +315,12 @@ class Danmaku {
|
|||
|
||||
htmlEncode (str) {
|
||||
return str.
|
||||
replace(/&/g, "&").
|
||||
replace(/</g, "<").
|
||||
replace(/>/g, ">").
|
||||
replace(/"/g, """).
|
||||
replace(/'/g, "'").
|
||||
replace(/\//g, "/");
|
||||
replace(/&/g, '&').
|
||||
replace(/</g, '<').
|
||||
replace(/>/g, '>').
|
||||
replace(/"/g, '"').
|
||||
replace(/'/g, ''').
|
||||
replace(/\//g, '/');
|
||||
}
|
||||
|
||||
resize () {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function i18n (lang) {
|
|||
|
||||
// add translation text here
|
||||
const tranTxt = {
|
||||
"zh-cn" : {
|
||||
'zh-cn' : {
|
||||
'Danmaku is loading': '弹幕加载中',
|
||||
'Top': '顶部',
|
||||
'Bottom': '底部',
|
||||
|
|
@ -58,7 +58,7 @@ const tranTxt = {
|
|||
'Live': '直播',
|
||||
'Video info': '视频统计信息',
|
||||
},
|
||||
"zh-tw" : {
|
||||
'zh-tw' : {
|
||||
'Danmaku is loading': '彈幕加載中',
|
||||
'Top': '頂部',
|
||||
'Bottom': '底部',
|
||||
|
|
|
|||
Loading…
Reference in New Issue