Skip to content

Commit

Permalink
智慧树视频支持
Browse files Browse the repository at this point in the history
  • Loading branch information
lifegpc committed Mar 24, 2020
1 parent f66cca2 commit 6f7f6c8
Show file tree
Hide file tree
Showing 7 changed files with 424 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 超星学习通谷歌浏览器扩展
## 功能
视频倍速播放,强制继续播放
现在已经支持智慧树啦
## 第三方库
[jQuery](https://jquery.com/)
[FileSaver](https://github.com/eligrey/FileSaver.js/)
Expand Down
2 changes: 2 additions & 0 deletions css/zhsvideofuck.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vf{position:fixed;background-color:#FFFFFFB3;width:fit-content;height:fit-content;max-width:200px;max-height:300px;overflow:auto;font-size:12px;color:red;z-index:1000000;}
.id{display:inline-block;}
8 changes: 8 additions & 0 deletions js(origin)/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ function set(setting=settings)
d.getElementById('showco').value=setting.showco;
d.getElementById('coal').value=setting.coal;
d.getElementById('cola').value=setting.cola;
d.getElementById('zhsvpap').value=setting.zhsvpap;
d.getElementById('zhsshowvc').value=setting.zhsshowvc;
d.getElementById('zhsctc').value=setting.zhsctc;
d.getElementById('zhsant').value=setting.zhsant;
}
function get()
{chrome.storage.sync.get(function(data)
Expand Down Expand Up @@ -57,6 +61,10 @@ function save()
qd.showco=d.getElementById('showco').value=="true";
qd.coal=d.getElementById('coal').value=="true";
qd.cola=d.getElementById('cola').value=="true";
qd.zhsvpap=d.getElementById('zhsvpap').value=="true";
qd.zhsshowvc=d.getElementById('zhsshowvc').value=="true";
qd.zhsctc=d.getElementById('zhsctc').value=="true";
qd.zhsant=d.getElementById('zhsant').value=="true";
chrome.storage.sync.set(qd);
}
d.addEventListener('DOMContentLoaded',function(){
Expand Down
20 changes: 19 additions & 1 deletion js(origin)/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ function scheck(settings,callback,o=0)
news.showco=false;
news.coal=false;
news.cola=false;
news.zhsvpap=false;
news.zhsshowvc=false;
news.zhsctc=false;
news.zhsant=false;
}
if(o==1)
{
Expand Down Expand Up @@ -142,6 +146,10 @@ function scheck(settings,callback,o=0)
isn('showco','Boolean',false);
isn('coal','Boolean',false);
isn('cola','Boolean',false);
isn('zhsvpap','Boolean',false);
isn('zhsshowvc','Boolean',false);
isn('zhsctc','Boolean',false);
isn('zhsant','Boolean',false);
}
if(r==-1)
{
Expand Down Expand Up @@ -201,6 +209,11 @@ function scheck(settings,callback,o=0)
isn2('showco','Boolean',settings);
isn2('coal','Boolean',settings);
}
function v6()
{
v5();
isn2('cola','Boolean',settings);
}
if(comv(sv,[1,0,4])==1&&comv(sv,[1,0,8])==-1)
{
need=true;
Expand Down Expand Up @@ -231,7 +244,12 @@ function scheck(settings,callback,o=0)
getnews();
v5();
}
if(!comv(sv,[1,0,12]))equalnow();
if(!comv(sv,[1,0,12])||!comv(sv,[1,0,13]))
{
need=true;
getnews();
v6();
}
}
}
if(need)
Expand Down
Loading

0 comments on commit 6f7f6c8

Please sign in to comment.