提交 04b4ab56 编写于 作者: C CodFrm

秒过确认&视频加速

上级 ff98df7c
......@@ -49,6 +49,7 @@ window.monitorPlay = function (playOver, config) {
player.play();
console.log(config);
player.muted = config.video_mute;
player.playbackRate = config.video_multiple;
} else {
clearInterval(time);
}
......
......@@ -70,6 +70,10 @@
<input type="checkbox" id="answer-ignore" />
<label for="answer-ignore" title="自动挂机时,忽略掉题目不做,直接跳过">忽略题目</label>
</div>
<div class="config-item" style="width:120px">
<label for="video-multiple" title="视频播放的倍数,1为正常速度">播放速度:</label>
<input type="text" id="video-multiple" style="font-size: 10px;width: 30%" placeholder="倍" />
</div>
<a href="import.html" target="_black">题库导入</a>
</div>
<div>
......
......@@ -31,6 +31,11 @@ window.onload = function () {
document.getElementById('video-mute').checked = items.video_mute;
document.getElementById('video-mute').onchange();
});
chrome.storage.sync.get('video_multiple', function (items) {
document.getElementById('video-multiple').value = items.video_multiple == undefined ? 1 : items.video_multiple;
});
chrome.storage.sync.get('answer_ignore', function (items) {
document.getElementById('answer-ignore').checked = items.answer_ignore;
document.getElementById('answer-ignore').onchange();
......@@ -71,4 +76,9 @@ window.onload = function () {
'interval': document.getElementById('interval').value
});
}
document.getElementById('video-multiple').onblur = function () {
chrome.storage.sync.set({
'video_multiple': document.getElementById('video-multiple').value
});
}
}
\ No newline at end of file
......@@ -16,7 +16,8 @@ window.onload = function () {
'interval',
'auto',
'video_mute',
'answer_ignore'
'answer_ignore',
'video_multiple'
], function (items) {
//设置一下配置
console.log(items);
......
......@@ -304,6 +304,11 @@ module.exports = function (_this, elLogo, index) {
//秒过按钮事件
boom.onclick = function () {
if (localStorage['boom_no_prompt'] == undefined || localStorage['boom_no_prompt'] != 1) {
var msg = prompt('秒过视频会产生不良记录,是否继续?如果以后不想再弹出本对话框请在下方填写yes')
if (msg === null) return;
if (msg === 'yes') localStorage['boom_no_prompt'] = 1;
}
getVideoInfo(function (json) {
var playTime = parseInt(json.duration - Math.random(1, 2));
send_time_pack(playTime, function (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册