From 050d1615f74525a75bc6bd26a8bddd4721000798 Mon Sep 17 00:00:00 2001 From: portix Date: Sat, 9 Jun 2012 12:04:36 +0200 Subject: Updating googledocs.js: make downloads from googledocs possible --- examples/js/googledocs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/js/googledocs.js') 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; } -- cgit v1.2.3