您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show Number of LeetCode Unsolved Problems for the new style
当前为
// ==UserScript== // @name Show Number of LeetCode Unsolved Problems // @namespace https://greatest.deepsurf.us/en/users/114838-groundzyy // @version 0.1 // @author groundzyy // @match https://leetcode.com/problemset/* // @description Show Number of LeetCode Unsolved Problems for the new style // ==/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) { if ($('#welcome > span').length == 1) { info = $('#welcome > span > span:nth-child(1)').text().split(" "); num_finished = Number(info[0].split('/')[0]); num_questions = Number(info[0].split('/')[1]); $('#welcome').append('<br/><span>' + num_finished + "/" + num_questions + ' (' + (num_questions - num_finished) + ')</span>'); } } }