Created
March 16, 2010 19:48
-
-
Save satyr/334421 to your computer and use it in GitHub Desktop.
Pipes: Copy RSS URL
This file contains hidden or 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 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