Hackathon on WebVR using A-Frame

What do you do with a HTC Vive and a few cardboards? Hack using A-Frame! We held a hackday to start creating virtual reality environment in Web browsers.

All participants from the hackaton

With the support of Michael Kohler, community organiser at Mozilla CH, we organised a hackathon in our Lausanne office. Food and beverage were provided with our great terrasse to enjoy.
Some devices were available. First Google Cardboard  to test our work and a HTC Vive to create an even better experience.
A Hololens was also available to test augmented reality. It was not the subject of the day, but it is always interesting to compare those two worlds.

Continue reading about Hackathon on WebVR using A-Frame

Tags: , , , , , ,

whereami extension: now privacy enabled

After having thought and worked some more on the whereami extension (see also the post from yesterday and here’s the installable file), there’s now a privacy feature built in. The first time a site asks for your geolocation data, you can allow or disallow it permanently (kind of like with cookies). You can also later edit those options again via the preferences of the extension (in the add-ons menu of firefox). This gives you the control on which sites you want to use your geloc-data and on which not (currently, flickr, yahoo maps, google maps and local.ch are supported as of version 0.4.0)

Furthermore I cleaned up the API of the extension a little bit, so that any site can access the extension without having to enhance the extension itself. Of course also with the privacy option mentioned above. This means that if you have a website and would like to know some geolocation data of your users (which have the whereami extension installed), this can now be easily done.

First, you need the following code from common_user.js. You can copy/paste that into your javascript files. Then you just call “whereami_getGeoLocation(callback)” with a callback function. As soon as the extension got the data from plazes, it calls that function with the data. An example:

Calling the showYourPosition() function would now just alert your position and city. Here’s the fully working example, also with code for getting the position of your friends.

As extension and random websites can’t directly communicate with each other, the two communicate via hidden DOM elements and firing events. The basic idea of this can be found on the mozilla developer wiki.

Maybe we will see some cool features with that in the future (and maybe I can finish the GPS support some day…).

Tags: , , , , , , ,

the whereami firefox extension

Long time ago I started with my first real firefox extension. I called it “whereami”, ’cause the basic idea is, that it shows where you are. It currently only works together with plazes, but a proof-of-concept for a GPS based “lookup” is already done.

But just telling you, where you are, is of course not really interesting in itself, but integrating that with other services could be. Therefore I integrated this with local.ch (and you guessed it, that’s the reason why I started the extension in the first place). When you now have installed the extension, configured it with your plazes username/password, have your plazer running (or later a GPS hooked up) and you go then www.local.ch, you’ll be redirected to the town you’re sitting and the map zooms to your location. Additionally, it shows where all your plazes-friends are (you have to zoom out, if they are not nearby).

Technically, the extension uses the Plazes API via gecko’s built-in XML-RPC library to get all the needed data. It also caches some data, so that it doesn’t have to make a request to plazes each and every time. But as it’s my first real firefox extension, it certainly still has some rough edges which could be done better technically.

The extension is also extensible, it currently not only works on local.ch, but also on flickr. If you want to upload a picture at http://flickr.com/photos/upload/, it automatically adds the necessary geolocation tags so that your picture is automatically placed on the right place on their map (or not, if the pics are taken on a different place than you do the upload :) ). More services would be certainly possible, so if you have any ideas, just tell me (or get the code at http://svn.liip.ch/repos/public/misc/whereami/ and hack it by yourself, adding new services should be quite straight forward)

The “compiled” and installable extension can be downloaded here: http://files.chregu.tv/whereami/whereami.xpi

There are of course many more ideas, what could be done with such an extensions, some can be found in the TODO file. But if you have more ideas, just tell us.

Btw, this extension was already announced on the local.ch blog two days ago, with some more info and a better how to us it explanation.

Update: Thanks to Gregor, it now also works on http://maps.google.com/. if you have the extension (at least version 0.2.1) installed and go to Google Maps, it automatically fills the near field on “Find Business” or “Get Directions” with your current Plazes coordinates. Cool.

Update II: To make things “equal”, it now also work with Yahoo Maps, it should automatically center to your location. I also introduced a new API to make it easier to use for other sites, but more about that later. In the meantime. you can look at the gmaps.js as an example.

Tags: , , , , , , ,

BXE doesn’t work in Firefox 1.5b1

Firefox 1.5 Beta 1 was released yesterday and it was finally time for me to check it out. Looks overall very good and has some nice new features.

But BXE doesn’t work anymore, since I can’t extend the Selection class anymore… Not sure yet, if that’s on purpose (I really hope not) or it’s something unintentionally slipped in (like what happend with FF 1.0.3). I filled a bug in bugzilla and I’m sure it will get fixed (and I’m glad I tested it before the actual release for once :) )

Update: The bug is fixed now, according to the Bugzilla entry and should be in the next release. I’ll test again.

Tags: , ,

My first firefox extension

Today I wrote my first firefox extension. Nothing fancy, it just enables caret browsing, if you’re on a BXE page and disables it again, if you’re on another page. No more hitting F7 for doing that. Unfortunately it’s not possible to add such a feature with remote scripts, the only way is to do it with a locally installed extension.

Writing the javascript for it was super-easy, but writing the installer for it was more complicated. But I did it, there are a lot of tutorials out there about it (it just looks like, that “they” change the installation procedure for every dot release…)

Here’s the xpi and here’s the svn repo.

Maybe I will extend that xpi with some additional features for BXE. But the plan is to always make BXE work without having to install an xpi. Otherwise we’re in update hell on each and every client, whereas with the current approach we only have to upgrade the server side. OTOH, if we can add some convenience or make BXE faster with a locally
installed extension, it’s maybe worth maintaining such a thing, but I still have a lot to learn regarding firefox extensions ;)

Tags: ,

Personalize Planet PHP

Annoyed/bored by some posts on Planet PHP? Then look no further than Sean’s little Greasemonkey script. It let’s you selectively disable the view of some blogs (if you’re using Firefox and have Greasemonkey installed). Cool, saves me from writing something like that on the server side (but we had no plans actually doing that anyway).

Speaking of Firefox/Mozilla, 48% of all hits on Planet PHP in May are from those browsers. OTOH, approx. 50% are also on the RSS feeds, looks like a lot of people are using Thunderbird, Firefox LiveBookmarks or Sage for reading these feeds.

Tags: , ,

New Mozilla/Firefox/Thunderbird Releases

The Mozilla Foundation released a whole bunch of new stuff today. Most notably, Firefox 1.0 Preview Release with a finally fixed XMLSerializer. Therefore BXE works like a charme again (in contrast to the 0.9 releases, resp. Mozilla 1.7.x) and faster than before. Of course, there are more new
features to be explored


  • Thunderbird 0.8, the standalone Mozilla mailer with a newly integrated RSS reader. I use Thunderbird as my everyday mailer and only can recommend it
  • Mozilla 1.7.3, a security bug fixes only release (BXE still has problems with that release, you should use 1.6 or 1.8alpha or Firefox 1.0 with BXE..)

Go and get it while it’s fresh ;)


New Mozilla/Firefox released – Security Update only

The Mozilla Foundation released 1.7.1 of the Mozilla Browser, 0.9.2 of Firefox and 0.7.1 of Thunderbird. Unfortunately, this is a security bugfix release only (only affecting Windows). Therefore the XMLSerializer Bug in Mozillareported earlier still isn’t fix in the latest releases (it is in the nightly snapshots).

Tags: ,

Broken XMLSerializer in Mozilla 1.7 and Firefox 0.9

The XMLSerializer of Mozilla 1.7/1.7.1 (and Firefox 0.9/0.9.1/0.9.2) strips the namespaces when an XHTML namespace is used. Bitflux Editor relies on it for saving the content, therefore you can’t use BXE with Mozilla 1.7 reliably (at least, if you’re using the XHTML namespace).

The Bug is fixed in the meantime in the latest nightly builds (also of the 1.7 branch).

We added also an alert to BXE, when you’re using Mozilla 1.7, so you’ll be warned…

Tags: ,

Free SSL certificates

Found today CAcert, an australian non-profit association, which issues SSL certificate for free. As I had to renew our (selfsigned) certificates anyway, I took the few steps needed to let them sign by them. Now, all our certificates (for http, imap/pop and smtp) are valid again and not only selfsigned

If you want to get the Root Certificate into your browser to avoid the annoying warnings, go to http://www.cacert.org/index.php?id=16 and import their root certificate. They even have a bug in bugzilla.mozilla.org to ship the root
certificate with Mozilla by default.