From 513f5bb988b48f81027f5471e106110112ae7e89 Mon Sep 17 00:00:00 2001 From: xmcp Date: Mon, 11 Mar 2019 22:52:22 +0800 Subject: [PATCH] silly update --- src/App.js | 17 ++++++++++++++--- src/Title.js | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 7bc072e2..180d8ead 100644 --- a/src/App.js +++ b/src/App.js @@ -48,6 +48,9 @@ class App extends Component { this.show_sidebar_bound=this.show_sidebar.bind(this); this.set_mode_bound=this.set_mode.bind(this); this.on_pressure_bound=this.on_pressure.bind(this); + // a silly self-deceptive approach to ban guests, enough to fool those muggles + // document cookie 'pku_ip_flag=yes' + this.inpku_flag=window[atob('ZG9jdW1lbnQ')][atob('Y29va2ll')].indexOf(atob('cGt1X2lwX2ZsYWc9eWVz'))!==-1; } on_pressure() { @@ -94,9 +97,17 @@ class App extends Component { {(token)=>(
- + {this.inpku_flag||token.value ? + : +
+
+

本网站仅限校内用户使用

+

请点击右上角的 按钮登录

+
+
+ }
)}
diff --git a/src/Title.js b/src/Title.js index dc449161..5b6206ad 100644 --- a/src/Title.js +++ b/src/Title.js @@ -159,7 +159,7 @@ class ControlBar extends PureComponent { export function Title(props) { let date=new Date(); - let is_eriri_birthday=(1+date.getMonth())===3 && date.getDate()===20; + let eriri_easteregg=(1+date.getMonth())===3 && date.getDate()===20 && !localStorage['REPLACE_ERIRI_WITH_URL']; return (
@@ -169,7 +169,7 @@ export function Title(props) { P大树洞

- { is_eriri_birthday ? + { eriri_easteregg ? 3月20日是看板娘英梨梨的生日 : "官方网页版" }