Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Reverts Instapaper to allowing you to click through to the original site rather than their internal page containing the parsed content.
// ==UserScript==
// @name Instapaper fixer
// @description Reverts Instapaper to allowing you to click through to the original site rather than their internal page containing the parsed content.
// @version 1.0.0
// @namespace http://crdx.org
// @include *//instapaper.com/*
// @include *//*.instapaper.com/*
// @grant none
// ==/UserScript==
var articles = document.getElementsByClassName("article_inner_item");
for (var i = 0; i < articles.length; i++) {
var article = articles[i];
var titleMeta = article.getElementsByClassName("title_meta")[0];
var host = titleMeta.getElementsByClassName("host")[0];
var directLink = host.children[0].href;
var titleRow = article.getElementsByClassName("title_row")[0];
titleRow.children[0].href = directLink;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment