Fake random.org

Fake ranndom.org result

目前为 2023-10-02 提交的版本,查看 最新版本

// ==UserScript==
// @name         Fake random.org
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Fake ranndom.org result
// @namespace    https://gist.github.com/nghiepdev/5cab09f3edb35c4a17af2453fb01a852
// @author       [email protected]
// @match        https://www.random.org/widgets/integers/iframe?title=True+Random+Number+Generator&buttontxt=Generate&width=160&height=230&border=on&bgcolor=%23FFFFFF&txtcolor=%23777777&altbgcolor=%23CCCCFFA&alttxtcolor=%23000000&defaultmin=1&defaultmax=100&fixed=off
// @icon         https://www.google.com/s2/favicons?sz=64&domain=random.org
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const RESULT = 13;
    const originalReplaceAll = window.replaceAll;
    window.replaceAll = (a, b, c) => {
        const result = originalReplaceAll(a, b, c);
        return result.replace(/\d+(?=\<br)/, RESULT);
    };
})();