FixUpBalze

Improves your Balze experience

目前為 2024-02-04 提交的版本,檢視 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         FixUpBalze
// @version      1.0.2
// @description  Improves your Balze experience
// @match        https://*.blazeapp.net/*
// @grant        none
// @license      MIT
// @namespace https://greasyfork.org/users/1253827
// ==/UserScript==

(function() {
    'use strict';

    document.title = document.title.replace(/Blaze/g, 'Balze');

    var favicon = document.querySelector("link[rel*='icon']");
    if (favicon) {
        favicon.href = 'https://i.ibb.co/hKbMN3J/balze.png';
    }

    document.body.innerHTML = document.body.innerHTML.replace(/Blaze/g, 'Balze');
    document.body.innerHTML = document.body.innerHTML.replace(/BLAZERS/g, 'BALZERS');
    document.body.innerHTML = document.body.innerHTML.replace(/Flame/g, 'Flop');
    document.body.innerHTML = document.body.innerHTML.replace(/flame/g, 'flop');
    document.body.innerHTML = document.body.innerHTML.replace(/excitement/g, 'boringness');
    document.body.innerHTML = document.body.innerHTML.replace(/thrill/g, 'disappointment');
    document.body.innerHTML = document.body.innerHTML.replace(/connection/g, 'disconnection');
    document.body.innerHTML = document.body.innerHTML.replace(/Meower/g, 'superior platform');
    document.body.innerHTML = document.body.innerHTML.replace(/spam posts that the spammers have created!/g, 'nice innocent posts that someone who was banned for no reason has created!');

    document.addEventListener('click', function(event) {
        if (event.target.tagName === 'A') {
            event.preventDefault();
            var randomDelay = Math.floor(Math.random() * (5700 - 3000 + 1) + 3000);
            setTimeout(function() {
                window.location.href = event.target.href;
            }, randomDelay);
        }
    });

    var blockedDomains = [
        'ipify.org',
        'synctrack.io',
        'geojs.io',
        'frog.wix.com',
        'wix-engage-visitors',
        'panorama.wixapps.net'
    ];

    var originalFetch = window.fetch;
    window.fetch = function(input, init) {
        var url = input;
        if (typeof input === 'object' && input.url) {
            url = input.url;
        }
        if (typeof url === 'string' && blockedDomains.some(function(domain) {
            return url.includes(domain);
        })) {
            return new Promise(function() {}); // Return an empty promise to block the request
        }
        return originalFetch.apply(this, arguments);
    };

    setTimeout(function() {
        setInterval(function() {
            var imgElements = document.getElementsByTagName('img');
            for (var i = 0; i < imgElements.length; i++) {
                var imgElement = imgElements[i];
                if (imgElement.src !== 'https://static.wixstatic.com/media/0a8e45_60ff7ca3bff3423584c62b64435f6fb5~mv2.jpg/v1/fill/w_106,h_56,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/Screenshot%202024-01-13%20at%206_edited_edited.jpg' && imgElement.src !== 'https://i.ibb.co/rwtXcH7/Balze.png') {
                    imgElement.src = 'https://i.ibb.co/4dPHbWG/Screenshot-from-2024-01-14-13-52-02-485th-copy.png';
                    imgElement.srcset = 'https://i.ibb.co/4dPHbWG/Screenshot-from-2024-01-14-13-52-02-485th-copy.png';
                }
                if (imgElement.src == 'https://static.wixstatic.com/media/0a8e45_60ff7ca3bff3423584c62b64435f6fb5~mv2.jpg/v1/fill/w_106,h_56,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/Screenshot%202024-01-13%20at%206_edited_edited.jpg') {
                    imgElement.src = 'https://i.ibb.co/rwtXcH7/Balze.png';
                    imgElement.srcset = 'https://i.ibb.co/rwtXcH7/Balze.png';
                }
            }
        }, 100); // 100 milliseconds = 0.1 seconds
    });
})();