Skip to content

Instantly share code, notes, and snippets.

View rominirani's full-sized avatar

Romin Irani rominirani

  • Mumbai
View GitHub Profile
@rominirani
rominirani / manifest.webapp
Created August 1, 2013 03:17
Episode #6 : Firefox OS Tutorial : Storage : manifest.webapp
{
"version":"1.0",
"name": "Notes",
"description": "This app uses the HTML5 Storage API to demonstrate how to save data in your Firefox OS Apps.",
"launch_path": "/index.html",
"icons": {
"16": "/images/icon_016.png",
"32": "/images/icon_032.png",
"48": "/images/icon_048.png",
"128": "/images/icon_128.png"
@rominirani
rominirani / index.html
Created August 1, 2013 03:18
Episode #6 : Firefox OS Tutorial : Storage : index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Notes</title>
<link rel="stylesheet" href="jquery.mobile-1.3.1.min.css" />
<script src="jquery-1.7.1.min.js"></script>
<script src="jquery.mobile-1.3.1.min.js"></script>
@rominirani
rominirani / app.js
Created August 1, 2013 03:19
Episode #6 : Firefox OS Tutorial : Storage : app.js
$(document).ready(function(){
$("#btnAddNote").click(function(){
//Change to the add-notes
$.mobile.changePage ($("#add-notes"));
});
$("#btnViewNotes").click(function(){
//Change to the add-notes
$.mobile.changePage ($("#view-notes"));
//Empty the list first
@rominirani
rominirani / manifest.webapp
Created August 15, 2013 10:54
Episode #7 - Firefox Tutorial - manifest.webapp
{
"version":"1.0",
"name": "Notes",
"description": "This app uses the HTML5 Indexed API to demonstrate how to save data in your Firefox OS Apps.",
"launch_path": "/index.html",
"fullscreen": "false",
"icons": {
"16": "/images/icon_016.png",
"32": "/images/icon_032.png",
"48": "/images/icon_048.png",
@rominirani
rominirani / index.html
Created August 15, 2013 10:55
Episode #7 : Firefox OS Tutorial : IndexedDB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0">
<title>Notes</title>
<link rel="stylesheet" href="jquery.mobile-1.3.1.min.css" />
<script src="jquery-1.7.1.min.js"></script>
<script src="jquery.mobile-1.3.1.min.js"></script>
@rominirani
rominirani / app.js
Created August 15, 2013 10:56
Episode #7 : Firefox OS Tutorial : IndexedDB - app.js
// variable which will hold the database connection
var db;
function initializeDB() {
if (window.indexedDB) {
console.log("IndexedDB support is there");
}
else {
alert("Indexed DB is not supported. Where are you trying to run this ? ");
}
@rominirani
rominirani / manifest.webapp
Created August 16, 2013 05:19
Episode #8 : FirefoxOS Tutorial : Web Activities
{
"version":"1.0",
"name": "Web Activities",
"description": "This app demonstrates how to use Web Activities (Intents) in a Firefox OS App.",
"launch_path": "/index.html",
"fullscreen": "false",
"icons": {
"16": "/images/icon_016.png",
"32": "/images/icon_032.png",
"48": "/images/icon_048.png",
@rominirani
rominirani / index.html
Created August 16, 2013 05:19
Episode #8 : FirefoxOS Tutorial : index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0">
<title>Web Activities</title>
<link rel="stylesheet" href="jquery.mobile-1.3.1.min.css" />
<script src="jquery-1.7.1.min.js"></script>
<script src="jquery.mobile-1.3.1.min.js"></script>
@rominirani
rominirani / app.js
Created August 16, 2013 05:20
Episode #8 : FirefoxOS Tutorial : app.js
$(document).ready(function(){
//Shown below are just a few Intents (Web Activities)
//Check out https://developer.mozilla.org/en-US/docs/WebAPI/Web_Activities#Firefox_OS_activities
$("#btnCall").click(function(){
var call = new MozActivity({
name: "dial",
data: {
number: "+1231231231"
}
@rominirani
rominirani / manifest.webapp
Created August 16, 2013 08:03
Episode #9: Firefox OS Tutorial : Device Storage manifest.webapp
{
"version":"1.0",
"name": "Device Storage",
"description": "This app demonstrates how to use Device Storage",
"launch_path": "/index.html",
"fullscreen": "false",
"icons": {
"16": "/images/icon_016.png",
"32": "/images/icon_032.png",
"48": "/images/icon_048.png",