diff --git a/package-lock.json b/package-lock.json
index b17c672..fea1fff 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10400,11 +10400,6 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz",
"integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw=="
},
- "react-lazyload": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/react-lazyload/-/react-lazyload-2.3.0.tgz",
- "integrity": "sha512-0z3qmL+qtSERdfKFpn0yKXm+1Gg1ZLZBXnCzHhSGiu1L8iDARuCkbOypxEx9+ETxZvMnXj98xvWCs5jyXTuM2w=="
- },
"react-scripts": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.1.1.tgz",
diff --git a/package.json b/package.json
index 7d72df3..e7184f9 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,6 @@
"pressure": "^2.1.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
- "react-lazyload": "latest",
"react-scripts": "^3.1.1",
"react-timeago": "^4.1.9"
},
diff --git a/public/index.html b/public/index.html
index ce420d2..d33c801 100644
--- a/public/index.html
+++ b/public/index.html
@@ -32,6 +32,7 @@
_czc.push(["_setAccount","1274501752"]);
_czc.push(["_setCustomVar","has_token",localStorage['TOKEN']?'yes':'no',1]);
_czc.push(["_setCustomVar","standalone",((window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone))?'yes':'no',1]);
+ _czc.push(["_setCustomVar","build_info","%REACT_APP_BUILD_INFO%"||'---']);
try {
var config=JSON.parse(localStorage['hole_config']||'{}');
for(var key in config)
diff --git a/src/BalanceShower.js b/src/BalanceShower.js
index 97f7c97..a68f037 100644
--- a/src/BalanceShower.js
+++ b/src/BalanceShower.js
@@ -15,9 +15,11 @@ export class BalanceShower extends PureComponent {
};
}
- do_load(token) {
+ do_load(e,token) {
if(this.state.loading_status==='loading')
return;
+ if(e.target.closest('a')) // clicking at a link
+ return;
if(!token || !window.config.easter_egg) {
this.setState({
loading_status: 'idle',
@@ -71,7 +73,7 @@ export class BalanceShower extends PureComponent {
render() {
return (
- 选择浅色或深色模式,或者与系统颜色模式一致
+ 选择浅色或深色模式,深色模式下将会调暗图片亮度
This program is free software: you can redistribute it and/or modify diff --git a/src/index.css b/src/index.css index 2e26d85..9f46326 100644 --- a/src/index.css +++ b/src/index.css @@ -19,7 +19,7 @@ a { color: #00c; } -.root-dark-mode .left-container a, .root-dark-mode .sidebar a, .root-dark-mode .sidebar-title a { +.root-dark-mode .left-container a, .root-dark-mode .sidebar a, .root-dark-mode .sidebar-title a, .root-dark-mode .balance-popover a { color: #9bf; } diff --git a/src/text_splitter.js b/src/text_splitter.js index 241c5e7..02f1b16 100644 --- a/src/text_splitter.js +++ b/src/text_splitter.js @@ -1,6 +1,6 @@ // regexp should match the WHOLE segmented part -export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])([1-9]\d{4,5})(?![\d\u20e3\ufe0e\ufe0f])/g; -export const URL_PID_RE=/((?:https?:\/\/)?pkuhelper\.pku\.edu\.cn\/hole\/?#(?:#|%23)([1-9]\d{4,5}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g; +export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])([2-9]\d{4,5}|1\d{4,6})(?![\d\u20e3\ufe0e\ufe0f])/g; +export const URL_PID_RE=/((?:https?:\/\/)?pkuhelper\.pku\.edu\.cn\/hole\/?#(?:#|%23)([2-9]\d{4,5}|1\d{4,6}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g; export const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Jolly|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win(?: \d+)?|洞主)(?![A-Za-z])/gi; export const URL_RE=/(^|[^.@a-zA-Z0-9_])((?:https?:\/\/)?(?:(?:[\w-]+\.)+[a-zA-Z]{2,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{1,5})?(?:\/[\w~!@#$%^&*()\-_=+[\]{};:,./?|]*)?)(?![a-zA-Z0-9])/gi;