Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.
To read it all in a single page:
- Go to the first chapter: https://basecamp.com/shapeup/0.1-foreword
- In the URL bar, type
javascript:
- Paste in this single line of JavaScript (so the URL bar looks like
javascript:var style=do...
)
var style=document.createElement('style');document.head.appendChild(style);style.sheet.insertRule('main {grid-template-areas: "header" "sidebar" "content" "footer" !important; grid-template-columns: auto !important;}');document.querySelector('main').setAttribute('data-new',!0);function loadNext(){const nextPageLink=document.querySelector('main[data-new] .intro__next a');const nextPage=nextPageLink&&nextPageLink.href;['main[data-new] .intro__book-title.button','main[data-new] .pagination','main[data-new] footer','main[data-new] .warning','main[data-new] template','main[data-new] nav','a.pop','main[data-new] .intro__sections','main[data-new] .intro__next'].forEach(selector=>{const els=document.querySelectorAll(selector);els.forEach(el=>el.parentElement.removeChild(el))});document.querySelector('main[data-new]').removeAttribute('data-new');if(nextPageLink){console.log('loading '+nextPage);fetch(nextPage.replace(/\/$/,'')).then(res=>res.text()).then(res=>document.body.insertAdjacentHTML('beforeend',res.replace(/^[\s\S]+<main/m,'<main data-new').replace(/<\/main>[\s\S]+/m,'</main>'))).then(loadNext)}else{alert('done.')}};loadNext()
- Hit enter & wait for it to say "done."
- Enjoy the entire book in a single page.
NOTE: The unminified source is below
After converting to a single page, use Amazon's Send To Kindle browser extension to send a complete copy of the book to your kindle for reading later: https://www.amazon.com/gp/sendtokindle