Skip to content

Instantly share code, notes, and snippets.

@cyrus-and
Last active October 26, 2016 21:11
Show Gist options
  • Save cyrus-and/23ce9a359807fb6d3d1707b080e635e5 to your computer and use it in GitHub Desktop.
Save cyrus-and/23ce9a359807fb6d3d1707b080e635e5 to your computer and use it in GitHub Desktop.
Style fix for Amazon's Send To Kindle Chrome extension
/* hide useless elements */
#s2k-feedback-menu,
#s2k-reader-header-logo,
#s2k-metadata-menu,
#s2k-reader-header-close {
display: none;
}
/* remove top bar */
#s2k-reader-header {
background: none !important;
box-shadow: none !important;
}
/* nicer send button */
#s2k-reader-header-send {
width: auto !important;
border: none !important;
background: none !important;
color: #dddddd !important;
}
/* place the style menu top left */
#s2k-layout-menu {
position: absolute !important;
top: 0 !important;
left: 0 !important;
}
#s2k-layout-header {
margin: 1em;
}
/* make the article fullscreen */
#s2k-reader-container {
top: 0 !important;
}
#s2k-reader {
border: none !important;
}
/* change the black theme colors */
.mode-black {
color: #dddddd !important;
background-color: #212324 !important;
}
/* more relaxed header */
header.s2k-article-header {
line-height: initial;
margin-top: 1em;
margin-bottom: 3em;
}
/* larger images */
.s2k-default-image {
width: auto !important;
max-width: 100% !important;
border: none !important;
}
.s2k-default-image img {
width: auto !important;
}
/* clickable metadata */
.s2k-metadata-content {
cursor: pointer;
}
/* bigger fixed width text snippets */
pre {
font-size: 60%;
}
/* fix numbered list margin and color */
ol, ul {
color: inherit !important;
margin-left: 2em !important;
}
setTimeout(function () {
document.querySelectorAll('.s2k-metadata-content').forEach(function (elem) {
elem.addEventListener('click', function () {
document.querySelector('#s2k-metadata-header').click();
});
});
}, 1000);
{
"manifest_version": 2,
"name": "Better Send To Kindle",
"version": "0.1",
"content_scripts": [
{
"matches": ["https://www.amazon.com/gp/sendtokindle/reader?article=*"],
"css": ["fix.css"],
"js": ["fix.js"]
}
],
"permissions": [
"https://www.amazon.com/gp/sendtokindle/reader?article=*"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment