提交 bde2cd82 编写于 作者: C CodFrm

v1.40

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