Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #118 - allow data to be sent on postError

  • Loading branch information...
commit 13e7c9137394a474ce0e780630dea457c2b2fc28 1 parent 81a8153
Paul Kinlan authored
View
2  .gitignore
@@ -15,6 +15,6 @@ server/lib/webintents*
demos/twitpic/public/assets/*
demos/memegen/public/assets/*
server/webintents/pages/webintents.*
-server/webintents/pages/cache.manifest
+server/webintents/static/cache.manifest
server/webintents/static/webintents.*
server/webintents/static/cache.manifest
View
91 conf/nginx.conf
@@ -1,91 +0,0 @@
-set $intents_home /intents_root
-
-#user nobody;
-worker_processes 1;
-
-#error_log logs/error.log;
-#error_log logs/error.log notice;
-#error_log logs/error.log info;
-
-#pid logs/nginx.pid;
-
-events {
- worker_connections 1024;
-}
-
-http {
- passenger_root /Library/Ruby/Gems/1.8/gems/passenger-3.0.9;
- passenger_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby;
-
- include mime.types;
- default_type application/octet-stream;
-
- #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- # '$status $body_bytes_sent "$http_referer" '
- # '"$http_user_agent" "$http_x_forwarded_for"';
-
- #access_log logs/access.log main;
-
- sendfile on;
- #tcp_nopush on;
-
- #keepalive_timeout 0;
- keepalive_timeout 65;
-
- #gzip on;
-
- server {
- listen 80;
-
- server_name webintents.org;
- default_type text/html;
-
- passenger_enabled on;
- root $intents_home/webintents/webintents/public;
-
- if ($host != 'webintents.org') {
- rewrite ^/(.*)$ http://webintents.org/$1 permanent;
- }
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
-
- server {
- listen 80;
-
- server_name examples.webintents.org;
- default_type text/html;
-
- passenger_enabled on;
- root $intents_home/webintents/examples/public;
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
-
- server {
- listen 80;
-
- server_name demos.webintents.org;
- default_type text/html;
-
- passenger_enabled on;
- root $intents_home/demo_tmp;
- passenger_enabled on;
- passenger_base_uri /twitpic;
- passenger_base_uri /memegen;
-
- rewrite ^/twitpic$ /twitpic/ redirect;
- rewrite ^/memegen$ /memegen/ redirect;
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
-}
View
30 server/webintents/static/cache.manifest
@@ -1,30 +0,0 @@
-CACHE MANIFEST
-
-intents.html
-list.html
-picker.html
-
-controller.js
-webintents.js
-webintents-server.js
-base64.js
-json2.js
-picker.js
-
-# Make time
-# Mon Oct 31 10:05:09 GMT 2011
-CACHE MANIFEST
-
-intents.html
-list.html
-picker.html
-
-controller.js
-webintents.js
-webintents-server.js
-base64.js
-json2.js
-picker.js
-
-# Make time
-# Thu Nov 17 20:32:46 CET 2011
View
6 src/webintents.js
@@ -93,10 +93,9 @@
!!intents[data.intent._id] == true &&
data.request &&
data.request == "errorResponse") {
- intents[data.intent._id].errorCallback();
+ intents[data.intent._id].errorCallback(data.intent.data);
}
else if (data.request == "ready") {
- console.log("Webintents frame ready");
parseIntentsDocument();
}
} catch (err) {
@@ -171,13 +170,14 @@
closed = true;
};
- this.postError = function() {
+ this.postError = function(data) {
if(closed) return;
var iframe = document.getElementById("webintents_channel");
var returnIntent = new Intent();
returnIntent._id = me._id;
returnIntent.action = me.action;
+ returnIntent.data = data;
setTimeout(function() {
iframe.contentWindow.postMessage(
_str({
Please sign in to comment.
Something went wrong with that request. Please try again.