diff --git a/common/Makefile b/common/Makefile
index 21c892b7..97d9c53b 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -38,6 +38,7 @@ BUILD_DIR = build.$(VERSION).$(OS)
AWK = awk
CURL = curl
+B64ENCODE = base64
.SILENT:
@@ -79,6 +80,9 @@ release: $(XPI) $(RDF)
# This is not for you!
dist: $(XPI)
@echo DIST $(XPI) $(GOOGLE)
+ set -e; \
+ which $$(echo $(B64ENCODE) | $(AWK) '{print $1}') >/dev/null; \
+ \
proj=$$(echo -n $(NAME) | sed 's/\(.\).*/\1/' | tr a-z A-Z); \
proj="$$proj$$(echo $(NAME) | sed 's/.//')"; \
[ -z "$$summary" ] && summary="$$proj $(VERSION) Release"; \
@@ -90,7 +94,7 @@ dist: $(XPI)
done; \
$(CURL) "$$@" --form-string "summary=$$summary" \
-F "filename=@$(XPI)" \
- -H "Authorization: Basic $$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | base64)" \
+ -H "Authorization: Basic $$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | $(B64ENCODE))" \
-i "$(GOOGLE)" | sed -n '/^Location/{p;q}'
$(RDF): $(RDF_IN) Makefile
diff --git a/common/content/util.js b/common/content/util.js
index eacd63d5..480deef0 100644
--- a/common/content/util.js
+++ b/common/content/util.js
@@ -328,14 +328,14 @@ const util = { //{{{
zip.open(FILE.file, io.MODE_CREATE | io.MODE_WRONLY | io.MODE_TRUNCATE);
function addURIEntry(file, uri)
zip.addEntryChannel(PATH + file, TIME, 9,
- services.get("io").newChannel(uri, null, null),
- false);
+ services.get("io").newChannel(uri, null, null), false);
function addDataEntry(file, data) // Inideal to an extreme.
addURIEntry(file, "data:text/plain;charset=UTF-8," + encodeURI(data));
let empty = util.Array.toObject(
"area base basefont br col frame hr img input isindex link meta param"
.split(" ").map(Array.concat));
+
let chrome = {};
for (let [file,] in Iterator(services.get("liberator:").FILE_MAP))
{
@@ -420,10 +420,10 @@ const util = { //{{{
},
/**
- * Sends a synchronous HTTP request to url and returns the
- * XMLHttpRequest object. If callback is specified the request is
- * asynchronous and the callback is invoked with the object as its
- * argument.
+ * Sends a synchronous or asynchronous HTTP request to url and
+ * returns the XMLHttpRequest object. If callback is specified the
+ * request is asynchronous and the callback is invoked with the
+ * object as its argument.
*
* @param {string} url
* @param {function(XMLHttpRequest)} callback