Remove Leetcode's Premium Problems

If you are not a VIP member of leetcode, you can't solve the premium problems which have a lock after them. But we can get rid of them~~~~~~ Fuck them and give you a nice interface!

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Remove Leetcode's Premium Problems
// @namespace    http://www.kongpingfan.com/
// @version      0.1.2
// @description  If you are not a VIP member of leetcode, you can't solve the premium problems which have a lock after them. But we can get rid of them~~~~~~ Fuck them and give you a nice interface!
// @author       kongpingfan
// @include        *leetcode.com*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
   setInterval(getRidOf,1500);
    function getRidOf(){
     if (document.getElementsByClassName("fa-lock")){
    var elements=document.getElementsByClassName("fa-lock");
    for (var i =0;i<elements.length;i++){
        if (elements[i].parentNode.parentNode.parentNode.parentNode.parentNode.tagName=="TR" ||elements[i].parentNode.parentNode.parentNode.parentNode.parentNode.tagName=="tr" ){
            elements[i].parentNode.parentNode.style.display="none";
        }
        if (elements[i].parentNode.parentNode.parentNode.tagName=="TR" ||elements[i].parentNode.parentNode.parentNode.tagName=="tr" ){
            elements[i].parentNode.parentNode.parentNode.style.display="none";
        }
    }
}
    }
})();