JoshWorth 78 Coins Always Flip on

Forces all coin flips to land on tails on joshworth.com/dev/78coins/

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         JoshWorth 78 Coins Always Flip on
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  Forces all coin flips to land on tails on joshworth.com/dev/78coins/
// @author       You
// @match        https://joshworth.com/dev/78coins/
// @grant        none
// @run-at       document-idle
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Wait for the page to fully load
    window.addEventListener('load', function() {
        // Override the random selection in the flip function
        const originalFlip = window.coins[0].flip;

        window.coins.forEach(coin => {
            coin.flip = function() {
                // Force tails by always returning tailFlip
                return window.getFlippage(this.box, window.tailFlip(this));
            };
        });

        // Also modify the initial state to show tails
        document.querySelectorAll('.coinHeads').forEach(head => {
            head.style.transform = 'matrix(1, 0, 0, 0, 0, 0)';
        });
        document.querySelectorAll('.coinTails').forEach(tail => {
            tail.style.transform = 'matrix(1, 0, 0, 1, 0, 0)';
        });

        console.log('All coins will now land on tails!');
    });
})();