NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @copyright 2019, D0n9X1n (https://openuserjs.org/users/MikeCoder) // @license MIT // @name Remove locked problems from leetcode.com // @namespace http://mikecoder.cn/leetcode.com // @version 0.8 // @description try to take over the leetcode site! // @author D0n9X1n // @match https://leetcode.com/problemset/* // @grant none // ==/UserScript== (function () { 'use strict'; var mainPage = document.getElementsByTagName("body")[0]; var button = document.createElement("input"); button.type = "button"; button.classList = "px-4 py-[10px] leading-tight rounded-full whitespace-nowrap flex space-x-2 items-center text-base pointer-event-none bg-gray-8 dark:bg-white text-label-r dark:text-dark-label-r shadow-level2 dark:shadow-dark-level2"; button.style = "position: fixed;z-index: 10000;top: 80%;left: 80%;width:150px"; button.value = "Hide Locked"; button.onclick = removeLocks; mainPage.append(button); function removeLocks() { console.log("remove locks"); var question = document.getElementsByTagName("table")[0]; console.log(question); var locks = document.getElementsByClassName("w-[18px] h-[18px] text-brand-orange dark:text-dark-brand-orange"); for (var i = 0; i < locks.length; i++) { if (locks[i].innerHTML == '<path fill-rule="evenodd" d="M7 8v2H6a3 3 0 00-3 3v6a3 3 0 003 3h12a3 3 0 003-3v-6a3 3 0 00-3-3h-1V8A5 5 0 007 8zm8 0v2H9V8a3 3 0 116 0zm-3 6a2 2 0 100 4 2 2 0 000-4z" clip-rule="evenodd"></path>') { console.log(locks[i].parentElement.parentElement.style.display = "None"); } } } })();