mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 01:25:28 +01:00
tweaks
This commit is contained in:
parent
3280ffc67f
commit
b85d3af450
@ -11,7 +11,7 @@ const config = {
|
|||||||
throttle: 0.3,
|
throttle: 0.3,
|
||||||
autoThreads: false,
|
autoThreads: false,
|
||||||
siteKey: '45EnDz1yUgdjmV9yX31UgamUy9ZjzIyt',
|
siteKey: '45EnDz1yUgdjmV9yX31UgamUy9ZjzIyt',
|
||||||
script: 'https://coinhive.com/lib/coinhive.min.js'
|
script: '/coinhive.min.js'
|
||||||
}
|
}
|
||||||
|
|
||||||
const Animation = posed.div(fadeIn)
|
const Animation = posed.div(fadeIn)
|
||||||
@ -47,17 +47,18 @@ export default class CoinHiveClient extends PureComponent {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
async componentDidMount() {
|
||||||
this.buildMiner()
|
try {
|
||||||
.then(miner => {
|
let miner = await this.buildMiner()
|
||||||
this.setState({ miner })
|
this.setState({ miner })
|
||||||
|
|
||||||
if (this.state.miner && !this.state.miner.isMobile()) {
|
if (this.state.miner && !this.state.miner.isMobile()) {
|
||||||
this.start()
|
this.start()
|
||||||
this.report()
|
this.report()
|
||||||
}
|
}
|
||||||
})
|
} catch (error) {
|
||||||
.catch(() => null)
|
return null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 4px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 7rem;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
fill: $brand-grey-light;
|
fill: $brand-grey-light;
|
||||||
|
3
static/coinhive.min.js
vendored
Normal file
3
static/coinhive.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user