Code beautiful

Rend les balises "code" plus belle

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Code beautiful
// @namespace    https://greasyfork.org/fr/scripts/25397-code-beautiful/
// @version      1.0
// @description  Rend les balises "code" plus belle
// @author       volca780
// @include      https://instant-hack.io/threads/*
// @include      https://instant-hack.io/threads/*/*
// @run-at       document-end
// @grant        none
// ==/UserScript==

$(document).ready(function(){

    var MAINCOL = "#E74C3C";
    var SECNCOL = "#2C3E50";
    var THIRCOL = "#3498DB";

    var MAINREG = /(\[.*\])/g;
    var SECNREG = /(\w*\d*)=/g;
    var THIRREG = /(.*)/g;

    var CODEINI = $("#selectmecode").html();

    var WORDS = CODEINI.match(MAINREG);
    var WORDS2 = CODEINI.match(SECNREG);
    var WORDS3 = CODEINI.match(THIRREG);

    x3 = 0;
    while(WORDS3.length > x3){
        var CODEINI = CODEINI.replace(WORDS3[x3], "<span style='color: " + THIRCOL + "'>" + WORDS3[x3] + "</span>");
        console.log(WORDS3[x3]);
        x3++;
    }

    x2 = 0;
    while(WORDS2.length > x2){
        var CODEINI = CODEINI.replace(WORDS2[x2], "<b><span style='color: " + SECNCOL + "'>" + WORDS2[x2] + "</span></b>");
        x2++;
    }

    x1 = 0;
    while(WORDS.length > x1){
        var CODEINI = CODEINI.replace(WORDS[x1], "<b><span style='color: " + MAINCOL + "'>" + WORDS[x1] + "</span></b>");
        x1++;
    }

    //console.log(CODEINI);
    $("#selectmecode").html(CODEINI);
});