summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <none@none>2012-06-09 12:04:36 +0200
committerportix <none@none>2012-06-09 12:04:36 +0200
commit050d1615f74525a75bc6bd26a8bddd4721000798 (patch)
tree53fb41d32a55d912b0be75d9d396e803c4fa9f14
parentb8bf4dd2351660d1e24d820ae6a1ec87ebe07431 (diff)
downloaddwb-050d1615f74525a75bc6bd26a8bddd4721000798.zip
Updating googledocs.js: make downloads from googledocs possible
-rw-r--r--examples/js/googledocs.js4
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;
}