diff options
author | portix <none@none> | 2012-06-09 12:04:36 +0200 |
---|---|---|
committer | portix <none@none> | 2012-06-09 12:04:36 +0200 |
commit | 050d1615f74525a75bc6bd26a8bddd4721000798 (patch) | |
tree | 53fb41d32a55d912b0be75d9d396e803c4fa9f14 | |
parent | b8bf4dd2351660d1e24d820ae6a1ec87ebe07431 (diff) | |
download | dwb-050d1615f74525a75bc6bd26a8bddd4721000798.zip |
Updating googledocs.js: make downloads from googledocs possible
-rw-r--r-- | examples/js/googledocs.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/js/googledocs.js b/examples/js/googledocs.js index 92163111..3ebc67c0 100644 --- a/examples/js/googledocs.js +++ b/examples/js/googledocs.js @@ -44,7 +44,9 @@ var id = signals.connect("download", downloadCheck); var reg = new RegExp(".*\.(" + supported.join("|") + ")$", "i"); function downloadCheck(w, d) { - if (reg.test(d.networkRequest.uri)) { + if (w.mainFrame.host === "docs.google.com") + return false; + else if (reg.test(d.networkRequest.uri)) { w.loadUri("http://docs.google.com/viewer?url=" + d.networkRequest.uri); return true; } |