Skip to content

Instantly share code, notes, and snippets.

@harthur
harthur / mc-github.md
Created May 5, 2011 23:13
Stuff to do for a mozilla-central on github
  • have a README.md
  • pull request with bug number will upload patch to bug
var x = 4;
function change(v) {
v = v + 9;
}
change(x);
console.log(x); // 4
@harthur
harthur / dnd.js
Created December 7, 2010 01:38
mozmill drag and drop shared module WIP
var EventUtils = {}; Components.utils.import('resource://mozmill/stdlib/EventUtils.js', EventUtils);
var dragBy = function(element, offsetX, offsetY, contentWindow) {
var rect = element.getBoundingClientRect();
var startX = (rect.right - rect.left)/2;
var startY = (rect.bottom - rect.top)/2;
var incrementX = offsetX / 2;
var incrementY = offsetY / 2;
EventUtils.synthesizeMouse(
@harthur
harthur / modal_dialog.diff
Created November 22, 2010 21:54
Mozmill modal dialog shared module refactor
# HG changeset patch
# Parent 6585aa4bca819847388eb3ea0e43622b0f9739e0
# User Henrik Skupin <hskupin@mozilla.com>
Bug 560820 - Refactor modal dialog to lower count of test failures. r=ctalbert
diff --git a/shared-modules/modal-dialog.js b/shared-modules/modal-dialog.js
--- a/shared-modules/modal-dialog.js
+++ b/shared-modules/modal-dialog.js
@@ -42,144 +42,101 @@
*
diff --git a/mozmill/mozmill/extension/resource/modules/controller.js b/mozmill/mozmill/extension/resource/modules/controller.js
index ffd8467..64f5ea3 100644
--- a/mozmill/mozmill/extension/resource/modules/controller.js
+++ b/mozmill/mozmill/extension/resource/modules/controller.js
@@ -100,47 +100,6 @@ waitForEvents.prototype = {
}
}
-/**
- * Dynamically create hierarchy of available menu entries
/*
Turns CommonJS package into a browser file.
Minifying requires UglifyJS (http://github.com/mishoo/UglifyJS)
to be in the dir above this one.
uses node-jake http://github.com/mde/node-jake
run with 'jake [build|minify|clean]'
*/
var fs = require("fs"),
path = require("path"),
Components.utils.import("resource://gre/modules/ctypes.jsm");
var EXPORTED_SYMBOLS = ["open"];
nspr = ctypes.open('/Applications/Minefield.app/Contents/MacOS/libnspr4.dylib');
var PR_AF_INET = 2;
var port = 2387;
diff --git a/Users/harth/jetpack-sdk/packages/jetpack-core/lib/securable-module.js b/mozmill/mozmill/extension/resource/modules/securable-module.js
index 57173a9..794c3e2 100644
--- a/Users/harth/jetpack-sdk/packages/jetpack-core/lib/securable-module.js
+++ b/mozmill/mozmill/extension/resource/modules/securable-module.js
@@ -204,7 +204,6 @@
};
return chrome;
}
-
var path = self.fs.resolveModule(rootDir, module);
properties of jquery couchdb's 'db' object:
name
uri
compact
viewCleanup
compactView
create
drop
info
changes
import httplib
import json
result = {
"firefox": {
"build_id": "20100401064631",
"version": "3.6.3"
},
"run_id": 0,
"timestamp": 1279376772,