Skip to content

Instantly share code, notes, and snippets.

Avatar
💭

wbamberg

💭
View GitHub Profile
View gist:1023487
this.addEventListener('click', function(event) {
if(event.button == 0 && event.shiftKey == false)
self.port.emit('left-click');
if(event.button == 2 || (event.button == 0 && event.shiftKey == true))
self.port.emit('right-click');
event.preventDefault();
}, true);
View gist:1045274
const widgets = require("widget");
const data = require("self").data;
const panel = require("panel");
var panelScript = "on('message', function(message) {" +
" console.log('receiving ' + message);" +
" }); "
var wid = widgets.Widget({
id: "some_menu",
View gist:1091317
const widgets = require("widget");
const tabs = require("tabs");
var tabArray = [];
var widget = widgets.Widget({
label: "Show tab history",
id: 'tab history',
contentURL: "http://www.mozilla.org/favicon.ico",
onClick: function() {
console.log('\n tab history:');
View gist:1093424
var pageMod = require("page-mod");
const tabs = require("tabs");
pageMod.PageMod({
include: ["*"],
contentScriptWhen: 'start',
contentScript: "console.log('the loco', window.location);"
});
tabs.open("www.mozilla.org");
View gist:1105560
tabs = require("tabs");
widget = require("widget").Widget({
id: "widgetID1",
label: "My Mozilla Widget",
content: require("tabs").activeTab.url,
width: 400
});
tabs.on("ready", function(tab) {
View gist:1112257
var panelLogin = require("panel").Panel({
contentURL: "http://www.mozilla.org",
width: 800,
height: 500,
contentScript: "window.addEventListener('click', function(event) {" +
"console.log('clicked');" +
"});",
contentScriptWhen: "ready"
});
View gist:2046453

Jetpack Developer Engagement Plan

About the Jetpack Project

Project Summary

The Jetpack project's aim is to make it easy to develop Firefox add-ons using JavaScript, HTML and CSS. It has two products:

  • the Add-on Builder, which is an online IDE for add-on development
  • the Add-on SDK, which is a downloadable SDK for developing add-ons locally
View Firefox for Android
## Firefox for Android ##
For more and more people mobile devices are the primary way, or even the only way, to access the Web. But at the moment the mobile web suffers from closed and controlled software platforms and a tendency towards a browser monoculture. Firefox for Android (codenamed Fennec) is an open, hackable, standards-based alternative browser, just like the desktop Firefox.
[Download Firefox for Android](https://www.mozilla.org/en-US/mobile/).
There are two different flavors of Firefox for Android, one for tablets and one for phones:
* the original version of Firefox for Android, like the desktop Firefox, uses XUL to construct its user interface. This is still the version aimed at, and officially supported on, tablets.
View gist:2512904

Firefox for Android

For more and more people mobile devices are the primary way, or even the only way, to access the Web. But at the moment the mobile web suffers from closed and controlled software platforms and a tendency towards a browser monoculture.

Firefox for Android (codenamed Fennec) is an open, hackable, standards-based alternative browser, just like the desktop Firefox.

There are two different flavors of Firefox for Android, one for tablets and one for phones:

  • the original version of Firefox for Android, like the desktop Firefox, uses XUL to construct its user interface. This is still the version aimed at, and officially supported on, tablets.
View gist:2522381

Developing for the mobile web

This page provides an overview of some of the main techniques needed to design web sites that work well on mobile devices.

We've organized it into two sections, designing for mobile devices and cross-browser compatibility.

Designing for mobile devices

Mobile devices have quite different hardware characteristics compared with desktop or laptop computers. Their screen are usually smaller, obviously, but they also usually automatically switch the screen orientation between portrait and landscape mode. They usually have touch screens for user input. APIs like geolocation or orientation are either not supported on desktops or are much less useful, and these give users new ways to interact with your site.