Skip to content

Instantly share code, notes, and snippets.

View jeffgca's full-sized avatar

Jeff Griffiths jeffgca

View GitHub Profile
@jeffgca
jeffgca / devtools-strawman.js
Last active December 11, 2015 03:48 — forked from anonymous/gist:4540452
Some ideas around devtools / Jetpack modules
/**
* an api for adding soemthing to the developer toolbar
*/
var devtool = require('devtools/toolbar').Tool({
label: 'My Dev Tool',
contentURL: self.data.url('index.html'),
contentScritpFile: self.data.url('tool.js')
onOpen: function(worker) {
worker.on('x', y); // etc.
}
const { Cc, Ci } = require("chrome");
const xpcom = require("xpcom");
const { Class } = require("api-utils/heritage");
exports.preventCrossRequest = Class({
extends: xpcom.Unknown,
interfaces: ["nsIContentPolicy"],
shouldLoad: function (contType, contLoc, reqOrig, ctx, typeGuess, extra) {
@jeffgca
jeffgca / zamboni.diff
Last active December 13, 2015 19:28 — forked from anonymous/gist:4962903
Add support to email all extension developers.
diff --git a/apps/zadmin/forms.py b/apps/zadmin/forms.py
index 366e8af..5395ac2 100644
--- a/apps/zadmin/forms.py
+++ b/apps/zadmin/forms.py
@@ -37,7 +37,8 @@ class DevMailerForm(happyforms.Form):
('payments',
'Developers of non-deleted apps (not add-ons) with payments'),
('desktop_apps',
- 'Developers of non-deleted apps supported on desktop')]
+ 'Developers of non-deleted apps supported on desktop')
/**
* Module for using an external editor.
*
* Example where the user will be prompted for the path
* to their editor of choice. The callback is passed the
* entirety of the changed contents, whenever a change is
* detected.
*
* const extEditor = require("ext-editor");
*
<?xml version="1.0" encoding="utf-8"?><!-- 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/. --><RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>REPLACE-THIS@jetpack</em:id>
<em:version>0.1</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
@jeffgca
jeffgca / gist:5266408
Last active December 15, 2015 13:24 — forked from wbamberg/gist:5266250
Hi
As you might already know, Firefox 20 makes a major change in the
way that private browsing is implemented, and this change inevitably affects
add-ons that use it.
Add-ons that use private browsing must be repacked with SDK 1.14
if they are to run on Firefox 20, and need code updates if they
want to be active in private windows.

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

The Browser Console

The Web Console was the first new developer tool added to Firefox 4, and the team has continued improving it in each release since. With Firefox 24 entering beta, we thought it would be a good time to highlight the features available in the Web Console and introduce its new cousin, the Browser Console.

The Browser Console replaces the venerable Error Console. To open it, hit the familiar Ctrl+Shift+J key-binding ( Command+Shift+J on OS X ):

  • Toggle the different message types: Net, CSS, JS, Security and Logging.
  • Select the level of severity of log messages you want to see for each type from the dropdowns.
@jeffgca
jeffgca / test.md
Last active December 21, 2015 01:18 — forked from anonymous/-
Aurora 25

Guess who's back? No, this isn't the [eighth track][rakim-guess-whos-back] from [hip-hop legend Rakim's first solo album][rakim-18th-letter], it's another episode of New Features in Firefox Developer Tools! Firefox 25 was just uplifted to the [Aurora release channel][aurora]; included were a bunch of developer tools bug fixes and improvements. This is a summary of some of the most exciting new features, you can also take a look at the [complete list of resolved bugzilla tickets][complete-bug-list].

Black box libraries in the Debugger

@jeffgca
jeffgca / jp-init.sh
Last active December 31, 2015 19:38 — forked from anonymous/-
script to initialize a blank jetpack extension.
#!/bin/bash
_PWD=`pwd`
mkdir -p "$_PWD/$1" && cd "$_PWD/$1" && jetpack init
echo "" > lib/main.js && echo "" > doc/main.md && echo "" > test/test-main.js && echo "" > ./README.md