Skip to content

Instantly share code, notes, and snippets.

Avatar

Luca Greco rpl

  • Mozilla
  • Lecce, Italy
View GitHub Profile
View StorageAreaSync-schema-json.diff
diff --git a/toolkit/components/extensions/schemas/storage.json b/toolkit/components/extensions/schemas/storage.json
--- a/toolkit/components/extensions/schemas/storage.json
+++ b/toolkit/components/extensions/schemas/storage.json
@@ -155,6 +155,135 @@
]
}
]
+ },
+ {
+ "id": "StorageAreaSync",
@rpl
rpl / .gitignore
Last active Oct 24, 2019
npm audit failure - "The server said: Invalid package tree, run npm install to rebuild your package-lock.json"
View .gitignore
node_modules
@rpl
rpl / .hgrc
Last active Jun 21, 2019
some useful mercurial aliases
View .hgrc
[revsetalias]
# pending commits (used in `hg lg` and `hg lgs aliases`)
pending = ancestors(.)&draft()
# recent bookmarks (used in `hg rbm` alias)
recent_bookmarks($1) = limit(reverse(sort(bookmark())), $1)
[alias]
# log only pendings commits
lg = log -r 'pending'
@rpl
rpl / 1-Bug_1285500___Fix_browser_ext_browserAction_popup_intermittency_when_browserAction_is_placed_in_the_overflow_menu_.patch
Created Feb 27, 2019
Avoid await on promiseDocumentFlushed when the browserAction is placed in the overflow menu
View 1-Bug_1285500___Fix_browser_ext_browserAction_popup_intermittency_when_browserAction_is_placed_in_the_overflow_menu_.patch
# HG changeset patch
# User Luca Greco <lgreco@mozilla.com>
# Date 1551125488 -3600
# Mon Feb 25 21:11:28 2019 +0100
# Node ID 42519936d019a00bd9ea52dcb6acf98a7545412b
# Parent 198cd4a81bf2afa7cc79360f90da7bc91218b76d
Bug 1285500 - Fix browser_ext_browserAction_popup intermittency when browserAction is placed in the overflow menu.
diff --git a/browser/components/extensions/ExtensionPopups.jsm b/browser/components/extensions/ExtensionPopups.jsm
--- a/browser/components/extensions/ExtensionPopups.jsm
View gettext.js
// i18n data that get's passed to jed
let DEFAULT_I18N_DATA = {
messages: {
en: {
'This is a test': 'This is a test',
},
fr: {
'This is a test': 'C\'est un test',
},
ja: {
@rpl
rpl / README.md
Last active Jan 23, 2018
A fiction example webextension (used to design a new userScripts WE API)
@rpl
rpl / generate_jscov_report_from_firefox_tests.md
Last active Sep 7, 2017
Locally generate JS coverage reports from Firefox tests
View generate_jscov_report_from_firefox_tests.md

Generate JSCOV reports from mochitest and xpcshell tests locally

  • create the directory where the lcov files will be stored
 mkdir /tmp/JSCOV 
  • generate the lcov files:
@rpl
rpl / android-support-activity-diagram.plantuml
Last active Jul 4, 2017
web-ext Android Support diagrams
View android-support-activity-diagram.plantuml
@startuml
title FirefoxAndroidExtensionRunner\n"run" Activity Diagram
partition "androidRunner.run" {
"adb.createClient" --> "this.adbDevicesDiscoveryAndSelect"
"this.adbDevicesDiscoveryAndSelect" --> "this.apkPackagesDiscoveryAndSelect"
@rpl
rpl / sinonstubs-to-jestmocks.js
Created Apr 15, 2017
jscodeship transform to help me porting a bunch of tests based on sinon to jest
View sinonstubs-to-jestmocks.js
// BE CAREFULL: commit any changes first and run the tests, don't trust the robots ;-)
const getSinonCalls = call => ({
type: 'CallExpression',
callee: {
type: 'MemberExpression',
object: {
type: 'Identifier',
name: 'sinon'
},
@rpl
rpl / api.js
Created Mar 15, 2017
tabTracker snippet
View api.js
const {Management} = Cu.import("resource://gre/modules/Extension.jsm", {});
....
class API extends ExtensionAPI {
getAPI(context) {
const {tabTracker} = Management.global;
return {
mynamespace: {
You can’t perform that action at this time.