Advertisement
Nurutomo2

Get Text From URL [Vanilla]

Sep 26th, 2018
2,768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getFromDataURL(u,f){
  2.     fetch(u).then(a=>a.text().then(f));
  3. }
  4.  
  5. // Example Use
  6. var c;
  7. getFromDataURL('https://pastebin.com/raw/PzgesDhD',(a)=>c=a);
  8. console.log(c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement