Skip to content

Instantly share code, notes, and snippets.

@boris1993
Last active December 25, 2023 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boris1993/90df248d9bfca334f9aa6a94f16119a7 to your computer and use it in GitHub Desktop.
Save boris1993/90df248d9bfca334f9aa6a94f16119a7 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name 去掉力扣中国的跳转提示
// @namespace https://gist.github.com/boris1993/90df248d9bfca334f9aa6a94f16119a7
// @version 2023-12-25
// @description 去掉LeetCode国际版顶端的力扣中国的跳转提示
// @author boris1993
// @license WTFPL
// @match https://leetcode.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=leetcode.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.addEventListener('load', function() {
const leetCodeCnBannerCloseButton = document.getElementsByClassName('text-body duration-600 absolute right-2.5 top-2.5 h-5 w-5 cursor-pointer rounded-[50px] bg-[rgba(0,0,0,0.2)] text-center font-bold leading-[1.3] text-white hover:bg-[rgba(0,0,0,0.7)]')[0];
if (!leetCodeCnBannerCloseButton) {
return;
}
leetCodeCnBannerCloseButton.click();
}, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment