// ==UserScript==
// @name indexCache
// @namespace indexCache
// @include http://www.SOMEWEBSITE.com/en
// @require https://cdn.firebase.com/js/client/2.2.3/firebase.js
// @version 1
// @grant none
// ==/UserScript==
var ref = new Firebase("https://SOMEFIREBASE.firebaseio.com/mine");
ref.on("child_added", function(snapshot) {
console.log(snapshot.val());
}, function (errorObject) {
console.log("The read failed: " + errorObject.code);
});
ref.push({
title: "Hello World!",
author: "Firebase",
location: {
city: "San Francisco",
state: "California",
zip: 94103
}
});
console.log('pushed Hello World')
ref.push({
title: "dude World!",
author: "Firebase2",
location: {
city: "San Franciscos",
state: "Californiaaaa",
zip: 94103
}
});
console.log('pushed dude World')
p:0: Browser went online. Reconnecting.firebase.js (line 38)p:0: Listen called for /mine defaultfirebase.js (line 38)0: set {"path":"/mine/-JnXUZccp15pvFDjYXMX","value":{"title":"Hello World!","author":"Firebase","location":{"city":"San Francisco","state":"California","zip":94103}},"Ug":null}firebase.js (line 38)p:0: Buffering put: /mine/-JnXUZccp15pvFDjYXMXfirebase.js (line 38)event: /mine:child_added:{"author":"Firebase","location":{"city":"San Francisco","state":"California","zip":94103},"title":"Hello World!"}firebase.js (line 38)pushed Hello WorldindexCa...user.js (line 29)0: set {"path":"/mine/-JnXUZcn9gOQJd4w-TmM","value":{"title":"dude World!","author":"Firebase2","location":{"city":"San Franciscos","state":"Californiaaaa","zip":94103}},"Ug":null}firebase.js (line 38)p:0: Buffering put: /mine/-JnXUZcn9gOQJd4w-TmMfirebase.js (line 38)event: /mine:child_added:{"author":"Firebase2","location":{"city":"San Franciscos","state":"Californiaaaa","zip":94103},"title":"dude World!"}firebase.js (line 38)pushed dude WorldindexCa...user.js (line 40)p:0: Making a connection attemptfirebase.js (line 38)c:0:0: Connection createdfirebase.js (line 38)frame writing exceptionfirebase.js (line 38)Wg@file:///C:/Users/xxx/AppData/Roaming/Mozilla/Firefox/Profiles/mhxxxjy.default/gm_scripts/indexCache/firebase.js:166:292
Tg.prototype.open/<@file:///C:/Users/xxx/AppData/Roaming/Mozilla/Firefox/Profiles/mxxxxjy.default/gm_scripts/indexCache/firebase.js:160:222
Tc/c@file:///C:/Users/xxx/AppData/Roaming/Mozilla/Firefox/Profiles/mxxxjy.default/gm_scripts/indexCache/firebase.js:42:105
firebase.js (line 38)c:0:0:0 Connecting via long-poll to https://xxxxxxxx.firebaseio.com/.lp?start=t&ser=67812856&cb=1&v=5firebase.js (line 38)
c:0:0:0 Timed out trying to connect.firebase.js (line 38)c:0:0:0 Longpoll is closing itselffirebase.js (line 38)c:0:0: Realtime connection failed.firebase.js (line 38)c:0:0: Closing realtime connection.firebase.js (line 38)c:0:0: Shutting down all connectionsfirebase.js (line 38)p:0: data client disconnectedfirebase.js (line 38)p:0: Trying to reconnect in 0msfirebase.js (line 38)0: onDisconnectEventsfirebase.js (line 38)
Cool. That confirms that:
- You aren't able to connect to Firebase.
- For some reason, WebSockets aren't available so we're trying to use long-polling.
- Long-polling is failing (which could be for any number of reasons).
Best bet would be to figure out why WebSockets don't work and fix that... but I don't know enough about GreaseMonkey to know how hard that is.
--
You received this message because you are subscribed to a topic in the Google Groups "greasemonkey-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/greasemonkey-users/eFkd3gj6itA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to greasemonkey-us...@googlegroups.com.
To post to this group, send email to greasemon...@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.
kh@chrome://greasemonkey-modules/content/sandbox.js -> file:///home/nils/.mozilla/firefox/wjn2h8g3.default/gm_scripts/firetest/firebase.js:172:293 hh.prototype.open/<@chrome://greasemonkey-modules/content/sandbox.js -> file:///home/nils/.mozilla/firefox/wjn2h8g3.default/gm_scripts/firetest/firebase.js:166:223 Rc@chrome://greasemonkey-modules/content/sandbox.js -> file:///home/nils/.mozilla/firefox/wjn2h8g3.default/gm_scripts/firetest/firebase.js:39:52 hh.prototype.open@chrome://greasemonkey-modules/content/sandbox.js -> file:///home/nils/.mozilla/firefox/wjn2h8g3.default/gm_scripts/firetest/firebase.js:166:194 zh/<@chrome://greasemonkey-modules/content/sandbox.js -> file:///home/nils/.mozilla/firefox/wjn2h8g3.default/gm_scripts/firetest/firebase.js:181:208
To unsubscribe from this group and all its topics, send an email to greasemonkey-users+unsub...@googlegroups.com.
To post to this group, send email to greasemon...@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "greasemonkey-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/greasemonkey-users/eFkd3gj6itA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to greasemonkey-users+unsub...@googlegroups.com.
To post to this group, send email to greasemon...@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.
---Ben