This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doVerifyReceipt(cb, options) { | |
navigator.mozApps.getSelf(function(app) { | |
var record = app.receipt; | |
if (!record) { | |
cb({"error": "Application not installed"}); | |
return; | |
} | |
if (typeof cb !== "function") { | |
throw "Callback not provided in doVerifyReceipt"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/content/media/MediaEngineDefault.cpp b/content/media/MediaEngineDefault.cpp | |
--- a/content/media/MediaEngineDefault.cpp | |
+++ b/content/media/MediaEngineDefault.cpp | |
@@ -1,13 +1,19 @@ | |
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | |
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
#include "MediaEngineDefault.h" | |
+#include "nsDOMFile.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html public "✰"> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>getUserMedia Video Example</title> | |
</head> | |
<body> | |
<button type="button" onclick="toggle()"> | |
Toggle Video | |
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Cc = Components.classes; | |
const Ci = Components.interfaces; | |
Components.utils.import("resource://gre/modules/Services.jsm"); | |
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); | |
Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports); | |
let gScriptDone = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {classes: Cc, interfaces: Ci, utils: Cu} = Components; | |
Cu.import("resource://gre/modules/NetUtil.jsm"); | |
// Let's enumerate all available files in ~ | |
function getHomeDir() { | |
let home = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); | |
home.initWithPath("~"); | |
if (!home.isDirectory()) { | |
alert("that seems wrong..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h1>Device Test</h1> | |
<ul id="contents"> | |
</ul> | |
<video id="tehvideo"/> | |
<audio id="tehaudio"/> | |
<script> | |
var devices; | |
var nav = navigator.QueryInterface(Components.interfaces.nsINavigatorUserMedia); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myGetUserMedia(constraints, cb) | |
{ | |
function errCb(code) | |
{ | |
cb(code, null); | |
} | |
function successCb(stream) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Firebase = require("./firebase-node.js"); | |
function Queue(ref) { | |
this._ref = ref; | |
} | |
Queue.prototype.pop = function(cb) { | |
this._ref.startAt().limit(1).once("child_added", this._pop.bind(this, cb)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Components && Components.classes) { | |
// This means we are in a Firefox extension. | |
var appShell = Components.classes["@mozilla.org/appshell/appShellService;1"] | |
.getService(Components.interfaces.nsIAppShellService); | |
// hiddenDoc will now point to a regular DOM document. | |
var hiddenDoc = appShell.hiddenDOMWindow.document; | |
// Create an iframe. | |
let iframe = hiddenDoc.createElementNS("http://www.w3.org/1999/xhtml", "iframe"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ../backbone/examples/todos/todos.js 2013-01-08 17:02:02.000000000 -0800 | |
+++ todos.js 2013-01-10 17:33:56.000000000 -0800 | |
@@ -1,7 +1,6 @@ | |
// An example Backbone application contributed by | |
// [Jérôme Gravel-Niquet](http://jgn.me/). This demo uses a simple | |
-// [LocalStorage adapter](backbone-localstorage.html) | |
-// to persist Backbone models within your browser. | |
+// Firebase adapter to persist Backbone models. | |
// Load the application once the DOM is ready, using `jQuery.ready`: |
OlderNewer