From 5ba4b84563d7a5ec336f1c66ac4b34dac1d8a5fa Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 16 Oct 2010 15:45:30 -0400 Subject: [PATCH] Hint mode: Don't be discouraged by a document's lack of a body. Closes issue #40. --HG-- extra : rebase_source : dfdf9cf61af76aa84841ff181f42afcf318bce6d --- common/Makefile | 52 +++++++++++++++++++++------------------- common/content/editor.js | 1 - common/content/hints.js | 2 -- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/common/Makefile b/common/Makefile index dd1e7d3e..ee2946aa 100644 --- a/common/Makefile +++ b/common/Makefile @@ -104,33 +104,35 @@ dist: $(XPI) -i "$(GOOGLE)" | sed -n '/^Location/{p;q;}' install: - export dir; \ - for dir in $(PROFILEPATHS); do \ - test -f "$$dir/profiles.ini" && break; \ - done; \ - profile=$$(sed 's/^$$/\#/' "$$dir/profiles.ini" |\ - awk -v"profile=$(PROFILE)" \ - 'BEGIN { RS="#" } \ - index($$0, "\nName=" profile "\n") { print; exit } \ - !profile && /\nName=default\n/ { args["name=default"] = $$0 } \ - !profile && /\nDefault=1/ { args["default=1"] = $$0 } \ + export dir; \ + for dir in $(PROFILEPATHS); do \ + test -f "$$dir/profiles.ini" && break; \ + done; \ + \ + profile=$$(sed 's/^$$/\#/' "$$dir/profiles.ini" | \ + awk -v"profile=$(PROFILE)" \ + 'BEGIN { RS="#" } \ + index($$0, "\nName=" profile "\n") { print; exit } \ + !profile && /\nName=default\n/ { args["name=default"] = $$0 } \ + !profile && /\nDefault=1/ { args["default=1"] = $$0 } \ END { if (args["default=1"]) print args["default=1"]; else print args["name=default"] }' |\ - awk -F= '{ args[$$1] = $$2 } \ + awk -F= '{ args[$$1] = $$2 } \ END {\ - if (args["IsRelative"]) print ENVIRON["dir"] "/" args["Path"];\ - else print args["Path"]\ - }'); \ - if ! test -d "$$profile"; then \ - echo >&2 "Can't locate profile directory"; \ - exit 1; \ - fi; \ - ext="$$profile/extensions/$(UUID)"; \ - rm -f "$$ext.xpi"; \ - rm -rf "$$ext"; \ - echo "Installing to $$ext"; \ - if which cygpath >/dev/null 2>&1; \ - then cygpath -wa .; \ - else pwd; \ + if (args["IsRelative"]) print ENVIRON["dir"] "/" args["Path"]; \ + else print args["Path"] \ + }'); \ + \ + if ! test -d "$$profile"; then \ + echo >&2 "Can't locate profile directory"; \ + exit 1; \ + fi; \ + \ + ext="$$profile/extensions/$(UUID)"; \ + rm -rf "$$ext.xpi" "$$ext"; \ + echo "Installing to $$ext"; \ + if which cygpath >/dev/null 2>&1; \ + then cygpath -wa .; \ + else pwd; \ fi >"$$ext" installxpi: xpi $(FIREFOX) $(XPI) diff --git a/common/content/editor.js b/common/content/editor.js index 581232e0..094e012c 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -624,7 +624,6 @@ const Editor = Module("editor", { mappings.add([modes.INSERT], [""], "Expand insert mode abbreviation", function () { - util.dumpStack("\n\n\n"); editor.expandAbbreviation(modes.INSERT); document.commandDispatcher.advanceFocus(); }); diff --git a/common/content/hints.js b/common/content/hints.js index ffb7ef0d..11702689 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -263,8 +263,6 @@ const Hints = Module("hints", { win = this._top; let doc = win.document; - if (!doc.body && !doc.document) - return; let [offsetX, offsetY] = this._getContainerOffsets(doc);