How to remix the web or how Forbes writes about me.

Categories Drumbeat, Kindle, Mozilla

I have spent most of my free time in last 2 years to teach people how to use web and technology for their own causes. Unfortunately I have a very limited ‘free’ time and I can only “start the fire” and to let people to develop the idea by them selves, with little push (or kick) from time to time.

I was a speaker to a very amazing group of art students and right now they have very short idea on what they can do on the Web, except hanging around on Facebook or downloading a movie from a torrent site. We had a great practical session together and I think they think differently about web right now. I’d love to do that again.

Forbes mentioned me in an article about remixing the web and using the the technology to fight for our own rights and for freedom of speech. I have “fired” our prime minister by creating a copy of the official government webpage with a surprising news :) The news was on every news e-paper in Bulgaria on the same day and on every hard copy edition on the next.

On the next day even the PM mentioned that “action” on the TV :)

Change can happen in seconds, especially with the tools and technology at our disposal

Capture API

Categories Kindle, Mozilla, Open Technologies

I am looking forward Capture API to become part of Firefox soon. It’s really cool if I have the opportunity to capture my camera and my microphone.

function success(data) {
  var container = document.createElement("div");
  document.body.appendChild(container);
  
  for (var i in data) {
    var img = document.createElement("img");
    img.src = data[i].uri;
    container.appendChild(img);
  }
}
 
function error(err) {
  alert(err.message + " (" + err.code + ")"); 
}
 
navigator.device.captureImage(success, error, { maxNumberOfMediaFiles: 1 });

This is already implemented here and it’s really useful if you want to work on mobile devices:

// capture callback
var captureSuccess = function(mediaFiles) {
    var i, path, len;
    for (i = 0, len = mediaFiles.length; i < len; i += 1) {
        path = mediaFiles[i].fullPath;
        // do something interesting with the file
    }
};

// capture error callback
var captureError = function(error) {
    navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};

// start audio capture
navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});

Mozilla #JetPack: Create a simple debugger

Categories Jetpack, Kindle, Mozilla, Technologies

So I wanted to create a simple JetPack debugger that will write me some data and will dump me some objects on my …Firefox error console.

Here is the code. This simple tutorial shows :

0. How to use some of Firefox Services via Services.jsm
1. How to work with nsIConsoleService

Why I need that? Well I want to debug some of my extensions without using console/notifications or Firebug. This can be usable for getting better support for users. You can always put some debug lines on your code that will be visible for your addon user.

Anyway this is an example library and it’s not for production use :)

Create a class-based library in #JetPack (addon SDK)

Categories Jetpack, Kindle, Mozilla, Open Technologies, Technologies

I just commit to GitHub a class based library called JPersona..

You can get the background color and text color of the active persona your Firefox is wearing and to do whatever you want.

This example shows :
0. How to import LightweightThemeManager – the one responsible for handling Personas.
1. How to write class-based library for JetPack
2. How to import this library in your main.js and how to use it.

Go now to github and give me a feedback