enforce About DPlayer contextmenu

This commit is contained in:
DIYgod
2017-09-03 05:03:19 +08:00
parent 38c10cbd5a
commit cbcdda09af
7 changed files with 22 additions and 16 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+8 -3
View File
@@ -967,7 +967,6 @@
width: 32px;
height: 100%;
text-align: center;
display: inline-block;
font-size: 0;
vertical-align: middle;
float: right;
@@ -1048,7 +1047,6 @@
.dplayer-menu-item {
height: 30px;
padding: 5px 10px;
box-sizing: border-box;
cursor: pointer;
@@ -1056,11 +1054,18 @@
background-color: rgba(255,255,255,.1);
}
.dplayer-menu-label a {
a {
display: inline-block;
padding: 0 10px;
line-height: 30px;
color: #eee;
font-size: 13px;
display: inline-block;
vertical-align: middle;
&:hover {
text-decoration: none;
}
}
}
}
+3 -3
View File
@@ -165,7 +165,7 @@ const html = {
</div>
</div>
</div>
${html.contextmenuList(option.contextmenu)}
${html.contextmenuList(option.contextmenu, tran)}
<div class="dplayer-notice"></div>`;
},
@@ -179,10 +179,10 @@ const html = {
return result;
},
contextmenuList: (contextmenu) => {
contextmenuList: (contextmenu, tran) => {
let result = '<div class="dplayer-menu">';
for (let i = 0; i < contextmenu.length; i++) {
result += `<div class="dplayer-menu-item"><span class="dplayer-menu-label"><a target="_blank" href="${contextmenu[i].link}">${contextmenu[i].text}</a></span></div>`;
result += `<div class="dplayer-menu-item"><a target="_blank" href="${contextmenu[i].link}">${tran(contextmenu[i].text)}</a></div>`;
}
result += '</div>';
+7 -6
View File
@@ -22,16 +22,12 @@ module.exports = (option) => {
video: {},
contextmenu: [
{
text: '关于作者',
text: 'About author',
link: 'http://diygod.me'
},
{
text: '播放器意见反馈',
text: 'DPlayer feedback',
link: 'https://github.com/DIYgod/DPlayer/issues'
},
{
text: '关于 DPlayer 播放器',
link: 'https://github.com/DIYgod/DPlayer'
}
]
};
@@ -55,5 +51,10 @@ module.exports = (option) => {
option.lang.toLowerCase();
}
option.contextmenu.push({
text: 'About DPlayer',
link: 'https://github.com/DIYgod/DPlayer'
});
return option;
};