Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
登陆二维码自动居中
  • Loading branch information
Huozzzy committed Nov 18, 2021
1 parent cf5a6d8 commit e30e663
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
本插件基于原开源插件`学习小熊`的版本,针对新的文章视频阅读规则开发的二次版本。

## 更新说明
v1.2.1(2021-11-18):

登陆二维码自动居中。

v1.2.0(2021-11-13):

增加自动答题功能,每日最高45分(取决于有没有把 每周答题 和 专项答题 做完)。
Expand Down
42 changes: 26 additions & 16 deletions js/login.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
let qrCode = document.querySelector('.ddloginbox');
if (qrCode) {
setTimeout(function () {
qrCode.scrollIntoView({
behavior: "smooth"
});
setTimeout(function () {
window.scrollTo({
left: (document.body.scrollWidth - document.documentElement.clientWidth) / 2,
top: window.scrollY,
behavior: 'smooth'
});
}, 1000 + Math.floor(Math.random() * 1000));
}, 1000 + Math.floor(Math.random() * 1000))
}
// var qrCode = document.querySelector('.ddloginbox');
// if (qrCode) {
// setTimeout(function () {
// qrCode.scrollIntoView({
// behavior: "smooth"
// });
// setTimeout(function () {
// window.scrollTo({
// left: (document.body.scrollWidth - document.documentElement.clientWidth) / 2,
// top: window.scrollY,
// behavior: 'smooth'
// });
// }, 1000 + Math.floor(Math.random() * 1000));
// }, 1000 + Math.floor(Math.random() * 1000))
// }

setTimeout(function () {
window.scrollTo({
left: (document.body.scrollWidth - document.documentElement.clientWidth) / 2,
top: 900,
behavior: 'smooth'
});
}, 10);

// chrome.runtime.sendMessage({"method": "checkLogin"});


// chrome.runtime.sendMessage({"method": "checkLogin"});
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "__MSG_extName__",
"version": "1.2.0",
"version": "1.2.1",
"default_locale": "zh_CN",
"description": "__MSG_extDescription__",
"icons": {
Expand Down

0 comments on commit e30e663

Please sign in to comment.