Torn: Color Picker

Add tooltips to colors on forums

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Torn: Color Picker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Add tooltips to colors on forums
// @author       Untouchable [1360035]
// @match        https://www.torn.com/forums.php*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';


    setTimeout(() => {

        $('.icon-text-color').click(() => {
            let colours = $('#bbc-editor > div.actions.no-select > ul > li.icon.icon-text-color.divider-right.mobile-hidden.modal.active > div > ul')[0].children;
            colours[0].title = "Red";
            colours[1].title = "Fuchsia";
            colours[2].title = "Violet";
            colours[3].title = "Dark blue";
            colours[4].title = "Blue";
            colours[5].title = "Turquoise";
            colours[6].title = "Dark green";
            colours[7].title = "Green";
            colours[8].title = "Light green";
            colours[9].title = "Yellow";
            colours[10].title = "Orange";
            colours[11].title = "Black";
            colours[12].title = "Deep grey";
            colours[13].title = "Medium grey";
            colours[14].title = "Light grey";
            colours[15].title = "Purple";
        });


    },1500);

})();