Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Twitterのページを半透明にし、背景画像を見やすくするためのGreasemonkey (Chromeでのみ動作確認済み)
// ==UserScript==
// @name Twitter Transparency
// @namespace http://d.hatena.ne.jp/yonchu
// @version 0.0.2
// @description Twitterのページを半透明化し、背景画像を見やすくする。
// @include https://twitter.com
// @include https://twitter.com/*
// @exclude https://twitter.com/settings
// @exclude https://twitter.com/settings/*
// @see http://d.hatena.ne.jp/yonchu/
// ==/UserScript==
// Version History:
// 0.0.1 - 2012/05/27 Release
// 0.0.2 - 2012/08/23 fixes include/exclude URL
(function() {
var addStyle = function(css) {
if (typeof GM_addStyle != 'undefined') {
GM_addStyle(css);
return;
}
var head = document.getElementsByTagName('head')[0];
var style = document.createElement("style");
style.type = "text/css";
style.appendChild(document.createTextNode(css));
head.appendChild(style);
};
// main
addStyle('.component[data-component-term="user_recommendations"] { \
display: none !important; \
} \
.site-footer { \
display: none !important; \
} \
.stats a, .metadata { \
color: #555 \
} \
.stream-item, .unselectable-stream-item { \
border-bottom: 1px solid #999999 !important; \
} \
#page-container { \
background: rgba(255,255,255,0.6) !important; \
} \
.hovered-stream-item, .stream-item:hover, .stream .new-tweets-bar, .stream .new-tweets-bar:active, body.user-style-twttr .stream-item:hover, body.user-style-twttr .stream .new-tweets-bar, body.user-style-twttr .stream .new-tweets-bar:active { \
background:rgba(255,255,255,0.2) !important; \
text-shadow: none !important; \
} \
.search-nav .list-link, .profile-nav .list-link { \
background-color: transparent !important; \
text-shadow: none !important; \
border-top: 0px solid rgba(0, 0, 0, .1); \
border-bottom: 0px solid rgba(0, 0, 0, .1); \
} \
.stream-item, .unselectable-stream-item { \
background-color: transparent !important; \
} \
.content-header, .header-inner { \
background-color: transparent !important; \
opacity: 0.9 !important; \
} \
.component, .site-footer, .flex-module, .flex-module-inner, .stats, .tweet-box { \
background-color: transparent !important; \
text-shadow: none !important; \
} \
.stats, .stats li { \
border-top: 1px solid rgba(0, 0, 0, .1); \
border-bottom: 1px solid rgba(0, 0, 0, .1); \
border-right: 0px solid rgba(0, 0, 0, .1); \
border-left: 0px solid rgba(0, 0, 0, .1); \
} \
.stats li + li a { \
border-left: 1px solid rgba(0, 0, 0, .1); \
}\
');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.