typeracer.com - Any Car Picture

Use any picture as your car without a premium account! The picture should be 58x24 px, or different size with the same aspect ratio.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         typeracer.com - Any Car Picture
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Use any picture as your car without a premium account! The picture should be 58x24 px, or different size with the same aspect ratio.
// @author       Balint Sotanyi
// @match        https://play.typeracer.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    var interval = setInterval(function() {

        var image_url = 'https://i.imgur.com/QIGSs8p.png'; // paste your image link here

        var my_car = document.querySelector('.avatar-self > .avatarContainer');
        if (my_car) {
                document.querySelector('.avatar-self > .avatarContainer').style.backgroundImage = `url('${image_url}')`;
        }
    }, 100);
})();