Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Twitter
- // @version 1.0
- // @author byuu
- // @include https://twitter.com/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- //about:config
- //[string] general.useragent.override.twitter.com = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
- var themed = 0;
- (function() {
- const allowCopyAndPaste = function(e) {
- e.stopImmediatePropagation();
- return true;
- };
- document.addEventListener('copy', allowCopyAndPaste, true);
- document.addEventListener('paste', allowCopyAndPaste, true);
- })();
- function allowInlineTweets() {
- var domain = ".twitter.com";
- var expiryDate = new Date(-1).toUTCString();
- document.cookie = "rweb_optin=; domain=" + domain + "; path=/; expires=" + expiryDate;
- }
- function applyTheme() {
- if(themed == 1) return;
- var stylesheet = window.document.styleSheets[0];
- if(!stylesheet) return;
- themed = 1;
- var style = document.createElement("style");
- style.type = "text/css";
- style.innerText = "" +
- "* { border-radius: 0em !important; } " + //revert circular avatars
- ".Banner { display: none !important; } " + //remove bloat
- ".topbar-spacer { padding-top: 45px !important; } " + //remove "deprecated browser" prompt
- ".wtf-module { display: none !important; } " + //remove "who to follow"
- ".WtfLargeCarouselStreamItem { display: none !important; } " + //remove inline "who to follow"
- ".Footer { display: none !important; } " + //remove bloat
- ".Trends { display: none !important; } " + //remove trends
- ".stream-tombstone-container { display: none !important; } " + //remove "blocked/muted tweet" indicator
- ".tooltip { display: none !important; } " + //remove annoying tooltips that tend to not go away
- ".DelightOptInModule { display: none !important; } " + //remove "new twitter" prompt
- "";
- document.head.appendChild(style);
- }
- function main() {
- applyTheme();
- allowInlineTweets();
- }
- main();
- var timer = setInterval(main, 50);
Add Comment
Please, Sign In to add comment