Advertisement
johnlockwood

Untitled

Feb 20th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. // Take the provided url, and add it to a YQL query.
  2.  
  3. var yql = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from html where url="' + site + '"') + '&format=xml&sort=alpha&sortdir=asc&callback=?';
  4.  
  5. function cbFunc(data) {
  6.  
  7. // If we have something to work with...
  8.  
  9. if ( data.results[0] ) {
  10.  
  11. // Strip out all script tags, for security reasons.
  12.  
  13. data = data.results[0].replace(/<script[^>]*>[\s\S]*?<\/script>/gi, '');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement