Skip to content

Instantly share code, notes, and snippets.

@libraplanet
Last active April 17, 2020 16:41
Show Gist options
  • Save libraplanet/afe8787e20f259f9297f5c2611f7c88c to your computer and use it in GitHub Desktop.
Save libraplanet/afe8787e20f259f9297f5c2611f7c88c to your computer and use it in GitHub Desktop.
!remove agreement dialog on twitter.
最近twitterで聞かれる、なんのことか良くわからないダイアログ。
同意以前に意味不明なため、ダイアログを非表示にします。
javascript:(function() { document.body.style.overflowY = ""; document.body.style.marginRight = ""; (function() { var remove = function(e) { e.parentNode.removeChild(e); }; document.querySelectorAll('div.css-1dbjc4n.r-11u3ssh').forEach(function(e) { remove(e); }); document.querySelectorAll('div.css-1dbjc4n.r-1awozwy.r-1kihuf0.r-18u37iz.r-1pi2tsx.r-1777fci.r-1pjcn9w.r-fxte16.r-1xcajam.r-ipm5af.r-g6jmlv').forEach(function(e) { remove(e); }); })(); })();
(function() {
document.body.style.overflowY = "";
document.body.style.marginRight = "";
(function() {
var remove = function(e) {
e.parentNode.removeChild(e);
};
document.querySelectorAll('div.css-1dbjc4n.r-11u3ssh').forEach(function(e) {
remove(e);
});
document.querySelectorAll('div.css-1dbjc4n.r-1awozwy.r-1kihuf0.r-18u37iz.r-1pi2tsx.r-1777fci.r-1pjcn9w.r-fxte16.r-1xcajam.r-ipm5af.r-g6jmlv').forEach(function(e) {
remove(e);
});
})();
})();
// ==UserScript==
// @name remove agreement dialog on twitter.
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://twitter.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
var remove = function(e) {
e.parentNode.removeChild(e);
};
var f = function() {
var a = document.querySelectorAll('div.css-1dbjc4n.r-11u3ssh');
if(a.length > 0) {
document.body.style.overflowY = "";
document.body.style.marginRight = "";
document.querySelectorAll('div.css-1dbjc4n.r-11u3ssh').forEach(function(e) {
remove(e);
});
document.querySelectorAll('div.css-1dbjc4n.r-1awozwy.r-1kihuf0.r-18u37iz.r-1pi2tsx.r-1777fci.r-1pjcn9w.r-fxte16.r-1xcajam.r-ipm5af.r-g6jmlv').forEach(function(e) {
remove(e);
});
}
}
setInterval(f, 1000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment