Skip to content

Instantly share code, notes, and snippets.

@HirbodBehnam
Last active December 1, 2019 12:42
Show Gist options
  • Save HirbodBehnam/2e079e187be0b1b6a6bcb734ed88474e to your computer and use it in GitHub Desktop.
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!
// ==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]);
}
}
})();
@HirbodBehnam
Copy link
Author

I know it's bullshit but it works :D

@hoseinhamzei
Copy link

thanks bro that was really annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment