提交 bde2cd82 编写于 作者: C CodFrm

v1.40

上级 81561cc9
{
"manifest_version": 2,
"name": "超星慕课小工具",
"version": "1.3.8",
"version": "1.4.0",
"description": "用于超星慕课的小工具",
"icons": {
"16": "img/logo.png",
......
module.exports = {
url: "https://blog.icodef.com:8081/",
version: 1.38,
version: 1.40,
update: 'https://github.com/CodFrm/cxmooc-tools/releases',
enforce: false
}
\ No newline at end of file
......@@ -24,6 +24,7 @@ window.monitorPlay = function () {
}
}
window.removeOldPlayer = function (obj) {
window.removeOldPlayer = function (obj) {
obj.setAttribute('data', document.head.getAttribute('url') + 'player/cxmooc-tools.swf');
}
......@@ -21,21 +21,21 @@ module.exports = function (_this, elLogo, index) {
var videoTopic = {};
var videoInfo = {};
//在框架内注入js
doc.head.setAttribute('url',moocServer.url)
doc.head.setAttribute('url', moocServer.url)
common.injected(doc, 'action.js');
//更换swf播放器
var timer=setInterval(function(){
var obj=doc.getElementsByTagName('object');
if(obj.length>0){
var timer = setInterval(function () {
var obj = doc.getElementsByTagName('object');
if (obj.length > 0) {
//开始重新加载
clearInterval(timer);
wid.removeOldPlayer(obj[0]);
}
},1000);
}, 1000);
//创建各个按钮
var hang_btn = createBtn('开始挂机');
hang_btn.value = index;
hang_btn.title = "先播放再点我";
hang_btn.title = "直接开始";
elLogo.appendChild(hang_btn);
hang_btn.onclick = function () {
wid.monitorPlay();
......@@ -116,7 +116,7 @@ module.exports = function (_this, elLogo, index) {
var right = '';
for (let i = 0; i < list.length; i++) {
if (list[i].isRight) {
right += '<span style="margin-left:6px;">'+list[i].name + ":" + list[i].description+'</span>';
right += '<span style="margin-left:6px;">' + list[i].name + ":" + list[i].description + '</span>';
}
}
if (right != '') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册