Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Fix Feedly Links
- // @namespace http://use.i.E.your.homepage/
- // @version 0.1
- // @description Removes the utm_source=feedly parameter from the end of feedly links.
- // @match http://www.feedly.com/*
- // @copyright 2013, Francisco Vieira
- // @require http://code.jquery.com/jquery-1.9.1.min.js
- // ==/UserScript==
- $(document).ready(function() {
- var BAD_PARAMETER = /[?&]utm_source=.*/;
- window.setInterval(function() {
- $('a').each(function(i, link) {
- console.log(link);
- var url = $(link).attr('href');
- console.log(url);
- if (url.match(BAD_PARAMETER)) {
- var new_url = url.replace(BAD_PARAMETER, "");
- console.log(new_url);
- $(link).attr('href', new_url);
- }
- });
- }, 500);
- });
Advertisement
Add Comment
Please, Sign In to add comment