Property Highlight

highlights properties, only yours

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name Property Highlight
// @namespace http://tampermonkey.net/
// @version 0.2
// @description highlights properties, only yours
// @author TheProfessor [1425134]
// @match https://www.torn.com/properties.php*
// @icon https://www.google.com/s2/favicons?sz=64&domain=torn.com
// @grant none
// @license MIT
// ==/UserScript==

function check(){
    var properties = $('.properties-list').children().each(function(){
        var prop = $(this);
        if ($(".image-description",prop).length>0){

                var des = $(".image-description",prop).text();

                if (des.includes('Leased to')){
                    var days_test = des.split('/')[0].split('(')[2];
                    var days = parseInt(des.split('/')[0].split('(')[1]);
                    // window.alert(days_test, typeof(days_test))
                    if (days_test <= 10){
                        $(".image-description",prop).css("background", "linear-gradient(0.25turn, rgba(255, 160, 0, 0.125), rgba(255, 160, 0, 0.325), rgba(255, 160, 0, 0.125))");
                    }
                }
                else if (des.includes('Owned by your spouse')){
                    $(".image-description",prop).css("background", "linear-gradient(0.25turn, rgba(210, 48, 48, 0.125), rgba(210, 48, 48, 0.8), rgba(210, 48, 48, 0.125))");
                }
                else if (des.includes('Owned by you') && !des.includes("spouse")){
                    $(".image-description",prop).css("background", "linear-gradient(0.25turn, rgba(40, 211, 45, 0.125), rgba(40, 211, 45, 0.325), rgba(40, 211, 45, 0.125))");
                }
                else if (des.includes('You and your spouse are living here')){
                    $(".image-description",prop).css("background", "linear-gradient(0.25turn, rgba(40, 210, 211, 0.125), rgba(40, 210, 211, 0.4), rgba(40, 210, 211, 0.125))");
                }
                else if (des.includes('Up for rent')){
                     $(".image-description",prop).css("background", "linear-gradient(0.25turn, rgba(36, 117, 255, 0.125), rgba(36, 117, 255, 0.325), rgba(36, 117, 255, 0.125))");
                }

            }
    });


}

(function() {
    setInterval(check,500);


})();