Created
February 22, 2016 17:06
-
-
Save fcharlier/834343b76f63bfaec993 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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