Skip to content
This repository was archived by the owner on Jul 2, 2020. It is now read-only.

Commit 11fe2a9

Browse files
committed
Increase the listening and logon function, repair repeated quick login error
1 parent 546a300 commit 11fe2a9

File tree

7 files changed

+366
-332
lines changed

7 files changed

+366
-332
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# for develop
22
test.html
3-
test.json
3+
buptnet.py
44

55
# editors
66
.idea

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`buptnet` ,方便北邮校园网登录的跨浏览器插件,基于 `Bootstrap3` 风格,主要采用 `jQuery``Highchart` 两个js库,主要功能有
44
- 多账号记录保存,多账号切换
5-
- 打开浏览器,自动登录首选账号登录
5+
- 打开浏览器或检测到登录页面,自动登录首选账号登录
66
- 剩余、使用流量占比可视化
77
- 动态校外流量速度曲线
88
- 账户网络、资费信息详情表格
@@ -55,10 +55,12 @@
5555
- **基本页面**里的转标签也可以将插件页面转为普通浏览器标签页,方便实时信息的查看和其他操作
5656
- **实时界面**提供5秒段校外流量曲线图,仅供测试参考,请不要常开此页面,以减轻学校网关服务器压力
5757
- **信息界面**里提供一些关于设备和账号的信息,其中账号名如果不是用本插件登录不准
58-
- **设置界面**可以进行自动登录的设置,自动登录原理为,当设备接入校园网时,一般浏览器会自动弹出登录界面,插件监听到这个页面并进行登录状态的判断,如果未登录则根据首选账号进行自动登录
58+
- **设置界面**可以进行插件的一些功能的个性化设置
59+
- 自动登录,自动登录过程为,当设备接入校园网时触发默认浏览器打开时,或者用户自己打开浏览器时,插件会判断是否已经登录,如果未登录,插件将自动登录首选账号
60+
- 监听登录,监听登录过程为,在打开浏览器的情况下,插件后台检测监听到一个校园网登录标签的创建,插件监听到这个页面后进行对登录状态的判断,如果未登录则根据首选账号进行自动登录
5961
- 后台运行设置,开启后插件将后台运行,即插件将每隔15min对账号的流量使用情况进行监控,在输入框输入流量边界值,点击设置条目将边界值设置给相应条目,每个条目设置为零代表关闭该项的监控提醒
60-
- 余量:当您剩余流量少于此值的时候,将会在浏览器内弹出提醒框,并在插件图标上显示剩余流量(单位G)
61-
- 段量:当您15min的间隔使用的流量超过此值时,将会在浏览器内弹出提醒框
62-
- 日量:您可以计划安排好每日使用流量,设置此值后,如果流量累计计算超出预设计算值,将会在浏览器内弹出提醒框
62+
- 余量:当您剩余流量少于此值的时候,将会在浏览器内弹出提醒框,并在插件图标上显示剩余流量(单位G)
63+
- 段量:当您15min的间隔使用的流量超过此值时,将会在浏览器内弹出提醒框
64+
- 日量:您可以计划安排好每日使用流量,设置此值后,如果流量累计计算超出预设计算值,将会在浏览器内弹出提醒框
6365
- 关于界面里面提供一些常用导航和作者信息
6466
- **搜索bt**,使用本功能需要保证插浏览器保存登录过byr bt站,在网页上左键选中一段文字如"黑暗骑士",右击菜单会出现"使用bt搜索黑暗骑士"的菜单项,点击该项会跳转bt的黑暗骑士搜索返回界面

css/popup.css

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ h1 {
2525
margin-top: 15px;
2626
}
2727

28-
.input-group .glyphicon{
28+
.input-group .glyphicon {
2929
top: 0px;
3030
}
3131

@@ -69,20 +69,20 @@ h1 {
6969
display: none;
7070
}
7171

72-
#tab-setting .panel-body{
72+
#tab-setting .panel-body {
7373
padding: 8px 15px;
7474
}
7575

76-
#bs-setting td > div{
76+
#bs-setting td > div {
7777
margin: 2px auto;
7878
}
7979

80-
#bk-setting .switch > div{
80+
#bk-setting .switch > div {
8181
float: right;
8282
margin: -5px 0 0 0;
8383
}
8484

85-
#bs-setting > .panel-heading{
85+
#bs-setting > .panel-heading {
8686
background-color: #5e81b5;
8787
}
8888

@@ -94,8 +94,9 @@ h1 {
9494
width: 100%;
9595
}
9696

97-
#bk-setting > .panel-heading{
97+
#bk-setting > .panel-heading {
9898
background-color: #905e93;
99+
border-color: #905e93;
99100
}
100101

101102
#bk-setting {
@@ -107,7 +108,7 @@ h1 {
107108
margin-bottom: 0px;
108109
}
109110

110-
.modal-body > div{
111+
.modal-body > div {
111112
margin-top: 10px;
112113
text-align: center;
113114
}
@@ -117,6 +118,6 @@ h1 {
117118
text-align: center;
118119
}
119120

120-
.error-template button{
121+
.error-template button {
121122
margin: 20px auto 10px auto;
122123
}

html/popup.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ <h3 class="panel-title">基础设置</h3>
177177
<td align="right"><input id="sw-auto" type="checkbox"></td>
178178
</tr>
179179
<tr>
180-
<th scope="row"><span data-toggle="tooltip" data-placement="right" title="重启浏览器后有效">监听登录页</span></th>
180+
<th scope="row"><span data-toggle="tooltip" data-placement="right" title="发现登录页时登陆首选">监听登录</span></th>
181181
<td align="right"><input id="sw-listen" type="checkbox"></td>
182182
</tr>
183183
</tbody>
@@ -295,16 +295,17 @@ <h2>404 Not Found</h2>
295295
</div>
296296
<div id="in-error">
297297
您当前接入的为BUPT-portal,并且未登录<br> 点击下面的按钮使用首选账户接入校园网并登陆
298-
<button type="button" id="btn-inlogin" class="btn btn-primary">接入校园网并登陆</button>
298+
<button type="button" id="btn-inlogin" class="btn btn-primary">接入校园网并登陆</button>
299299
</div>
300300
<div class="alert alert-danger" style="display:none" id="inlogin-fail">
301301
首选账号为空,请自行接入校园网
302-
</div>
302+
</div>
303303
</div>
304304
</div>
305305
<!-- end of 404 -->
306306
</div>
307307

308+
<!-- end of container -->
308309
</div>
309310

310311
<div class="modal fade" id="myModal" tabindex="-1" aria-labelledby="myModalLabel">

0 commit comments

Comments
 (0)