Last active
December 1, 2019 12:42
-
-
Save HirbodBehnam/2e079e187be0b1b6a6bcb734ed88474e to your computer and use it in GitHub Desktop.
You cannot remove the "Due to U.S. trade controls law restrictions" alert on github? Use this script with tampermonkey!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Github Racism | |
// @namespace http://tampermonkey.net/ | |
// @version 1 | |
// @description Your account been restricted by github and you can see the big fucking "Due to U.S..."? No more fam! FUCK GITHUB AND USA | |
// @author Hirbod Behnam | |
// @match https://*.github.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var elements = document.getElementsByClassName("flash-warn"); | |
for(var i = 0;i< elements.length;i++){ | |
var a = elements[i].childNodes[1].childNodes[1].textContent.trim(); | |
if(a.startsWith("Due to U.S.")){ | |
elements[i].parentNode.removeChild(elements[0]); | |
} | |
} | |
})(); |
thanks bro that was really annoying
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know it's bullshit but it works :D