Skip to content

Instantly share code, notes, and snippets.

@fcharlier
Created February 22, 2016 17:06
Show Gist options
  • Save fcharlier/834343b76f63bfaec993 to your computer and use it in GitHub Desktop.
Save fcharlier/834343b76f63bfaec993 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name getpocketNoRedirect
// @namespace net.ploup
// @version 0.9
// @description Rewrite getpocket.com/redirect links to direct links
// @author François Charlier <fcharlier@ploup.net>
// @match https://getpocket.com/a/queue/
// @grant none
// ==/UserScript==
function getpocketNoRedirect() {
$('a.original_url[href*="https://getpocket.com/redirect"]').attr('href', function() {
var uri = decodeURIComponent($(this).attr('href').replace('https://getpocket.com/redirect?url=',''));
console.log(uri);
return uri;
});
}
$(document).ajaxComplete(function(){
getpocketNoRedirect();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment