add imasugu

This commit is contained in:
xmcp
2019-04-02 22:59:09 +08:00
parent 22d232030a
commit cfe38d42c8
3 changed files with 13 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "src/imasugu"]
path = src/imasugu
url = https://github.com/xmcp/imasugu

View File

@@ -5,6 +5,8 @@ import {Sidebar} from './Sidebar';
import {PressureHelper} from './PressureHelper'; import {PressureHelper} from './PressureHelper';
import {TokenCtx} from './UserAction'; import {TokenCtx} from './UserAction';
import ImasuguApp from './imasugu/src/App';
function DeprecatedAlert(props) { function DeprecatedAlert(props) {
if(['pkuhelper.com','www.pkuhelper.com','webhole.xmcp.ml','127.0.0.1','localhost'].indexOf(document.domain)===-1) if(['pkuhelper.com','www.pkuhelper.com','webhole.xmcp.ml','127.0.0.1','localhost'].indexOf(document.domain)===-1)
return ( return (
@@ -79,6 +81,13 @@ class App extends Component {
} }
render() { render() {
if(window.location.search.match(/[?&]imasugu($|&)/)) {
document.body.style.backgroundColor='white';
return (
<ImasuguApp />
);
}
return ( return (
<TokenCtx.Provider value={{ <TokenCtx.Provider value={{
value: this.state.token, value: this.state.token,

1
src/imasugu Submodule

Submodule src/imasugu added at d5a1464b23