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. 8, 2012, 5:58 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « files/default.js ('k') | files/lists.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if(opera.version() >= 12.1)
7 request.timeout(12000); //Only supported in Oper a 12.1+, 12 seconds timeout
8 request.send();
9 if (request.readyState == 4 && request.status == 200) {
10 return request.responseText;
11 }
12 }
13 catch(e) {}
14 }
15 return false;
16 }
OLDNEW
« no previous file with comments | « files/default.js ('k') | files/lists.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld