Skip to content

Instantly share code, notes, and snippets.

@johnbocook
Created January 13, 2016 20:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save johnbocook/afa7e5a4539fa85fd9d1 to your computer and use it in GitHub Desktop.
Save johnbocook/afa7e5a4539fa85fd9d1 to your computer and use it in GitHub Desktop.
Userscript Tamper Monkey Grease Monkey - Makes pocket app (getpocket.com) articles full width.
// ==UserScript==
// @name GetPocket - Page adjustments
// @namespace https://getpocket.com/a/read/
// @description Fixes page layout
// @author jbocook
// @copyright 2015
// @version 1.0.0
// @include *getpocket.com/a/read/*
// @grant none
// ==/UserScript==
(function() {var css = [
".fontsize-2 .reader_content {",
" max-width:99% !important;",
"}",
"code, kbd, pre, samp {",
" font-size: .84em;",
"}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment