Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: files/download.js

Issue 8493027: Acquired Opera AdBlock code (Closed)
Patch Set: Created Oct. 2, 2012, 1:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 function download(url) {
2 if(url.indexOf("http") == 0) { //Only accepts http and https URLs
3 try {
4 var request = new window.XMLHttpRequest();
5 request.open('GET', url, false);
6 request.send();
7 if (request.readyState == 4 && request.status == 200) {
8 return request.responseText;
9 }
10 }
11 catch(e) {}
12 }
13 return false;
14 }
OLDNEW

Powered by Google App Engine
This is Rietveld