Skip to content

Instantly share code, notes, and snippets.

@satyr
Created March 16, 2010 19:48
Show Gist options
  • Save satyr/334421 to your computer and use it in GitHub Desktop.
Save satyr/334421 to your computer and use it in GitHub Desktop.
Pipes: Copy RSS URL
// ==UserScript==
// @name Pipes Copy RSS URL
// @description Copies a human readable version of it.
// @namespace http://pipes.yahoo.com/matyr
// @include http://pipes.yahoo.com/pipes/pipe.info?_id=*
// ==/UserScript==
var btn = document.createElement('button');
btn.innerHTML = '<u>C</u>opy RSS URL';
btn.accessKey = 'C';
btn.addEventListener('click', function(e){
prompt(
'Pipes Copy RSS URL',
(document.querySelector('h4.permalink > span').textContent +
'?_render=rss&'+
Array.map(
document.querySelectorAll('#runform .label + td > input'),
function(lm)(encodeURIComponent(lm.name) +'='+
encodeURIComponent(lm.value))).join('&')));
}, false);
document.getElementById('runform').parentNode.appendChild(btn);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment