Skip to content

Tampermonkey script to identify job posts from certain country in upwork – 2

I have updated the script a little more to remove the red text and show them a silver color that perceives like a disabled state. Also the job posts that have less than 5 bids are blinking. The tampermonkey script is like as fllowing:

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.upwork.com/ab/find-work/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    setInterval(function(){
        var d = new Date();
        var n = d.getSeconds();
        document.querySelectorAll('.ng-binding').forEach(function(obj){
            if(obj.innerHTML === 'Less than 5'){
                if(n%2 == 0){
                    obj.style.color = "#14bff4";
                }else{
                    obj.style.color = "black";
                }
            }
        });
        document.querySelectorAll('.client-location').forEach(function(obj){
            if(obj.innerHTML == 'India' || obj.innerHTML == 'Bangladesh' || obj.innerHTML == 'Pakistan'){
                var parentDiv = obj.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
                var allChilds = parentDiv.querySelectorAll("*");
                allChilds.forEach(function(iteratableObject){
                    iteratableObject.style.color = "silver";
                })
            }
        });
    }, 1000);
})();

Leave a Reply

Your email address will not be published. Required fields are marked *