leetcode-cn hide premium problems

Hide Premium Problems on Leetcode

La data de 28-05-2019. Vezi ultima versiune.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         leetcode-cn hide premium problems
// @namespace https://greatest.deepsurf.us/en/users/304696-ruanima
// @description:en Hide Premium Problems on Leetcode
// @version      0.4
// @author      ruanimal 
// @thanks     hntee
// @match        https://leetcode-cn.com/problemset/*
// @description Hide Premium Problems on Leetcode
// ==/UserScript==


(function() {
    'use strict';
    observeDomChange();
})();

function observeDomChange() {
    var MutationObserver = window.MutationObserver;
    var myObserver       = new MutationObserver (mutationHandler);
    var obsConfig        = {
        childList: true, attributes: true,
        subtree: true,   attributeFilter: ['list-group']
    };
    myObserver.observe (document, obsConfig);
    function mutationHandler (mutationRecords) {
        $('tr i.fa-lock').parent().parent().parent().parent().parent().hide();
    }
}