Skip to content

Instantly share code, notes, and snippets.

@kotobukid
Created April 27, 2024 13:52
Show Gist options
  • Save kotobukid/b2d74717683f6371b6e6b06983bf227c to your computer and use it in GitHub Desktop.
Save kotobukid/b2d74717683f6371b6e6b06983bf227c to your computer and use it in GitHub Desktop.
超ワイドにホームタイムラインを表示しよう
// ==UserScript==
// @name Wide Twitter
// @namespace http://tampermonkey.net/
// @version 2024-04-26
// @description try to take over the world!
// @author You
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
const style_text = `[data-testid="primaryColumn"] {max-width: 100%;}
[role="main"]>div { width: 100%; }
[role="banner"] {
align-items: baseline;
max-width: 315px;
width: 315px;
}
[tabindex="0"]>div {
width: 100%;
max-width: 100%;
}
[role="complementary"] { display: none; }
[data-testid="sidebarColumn"] { display: none; }
`
const $style = document.createElement('style');
$style.innerText = style_text;
document.getElementsByTagName('head')[0].appendChild($style);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment