mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:47:59 +01:00
Hint mode: Don't be discouraged by a document's lack of a body. Closes issue #40.
--HG-- extra : rebase_source : dfdf9cf61af76aa84841ff181f42afcf318bce6d
This commit is contained in:
@@ -104,33 +104,35 @@ dist: $(XPI)
|
|||||||
-i "$(GOOGLE)" | sed -n '/^Location/{p;q;}'
|
-i "$(GOOGLE)" | sed -n '/^Location/{p;q;}'
|
||||||
|
|
||||||
install:
|
install:
|
||||||
export dir; \
|
export dir; \
|
||||||
for dir in $(PROFILEPATHS); do \
|
for dir in $(PROFILEPATHS); do \
|
||||||
test -f "$$dir/profiles.ini" && break; \
|
test -f "$$dir/profiles.ini" && break; \
|
||||||
done; \
|
done; \
|
||||||
profile=$$(sed 's/^$$/\#/' "$$dir/profiles.ini" |\
|
\
|
||||||
awk -v"profile=$(PROFILE)" \
|
profile=$$(sed 's/^$$/\#/' "$$dir/profiles.ini" | \
|
||||||
'BEGIN { RS="#" } \
|
awk -v"profile=$(PROFILE)" \
|
||||||
index($$0, "\nName=" profile "\n") { print; exit } \
|
'BEGIN { RS="#" } \
|
||||||
!profile && /\nName=default\n/ { args["name=default"] = $$0 } \
|
index($$0, "\nName=" profile "\n") { print; exit } \
|
||||||
!profile && /\nDefault=1/ { args["default=1"] = $$0 } \
|
!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"] }' |\
|
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 {\
|
END {\
|
||||||
if (args["IsRelative"]) print ENVIRON["dir"] "/" args["Path"];\
|
if (args["IsRelative"]) print ENVIRON["dir"] "/" args["Path"]; \
|
||||||
else print args["Path"]\
|
else print args["Path"] \
|
||||||
}'); \
|
}'); \
|
||||||
if ! test -d "$$profile"; then \
|
\
|
||||||
echo >&2 "Can't locate profile directory"; \
|
if ! test -d "$$profile"; then \
|
||||||
exit 1; \
|
echo >&2 "Can't locate profile directory"; \
|
||||||
fi; \
|
exit 1; \
|
||||||
ext="$$profile/extensions/$(UUID)"; \
|
fi; \
|
||||||
rm -f "$$ext.xpi"; \
|
\
|
||||||
rm -rf "$$ext"; \
|
ext="$$profile/extensions/$(UUID)"; \
|
||||||
echo "Installing to $$ext"; \
|
rm -rf "$$ext.xpi" "$$ext"; \
|
||||||
if which cygpath >/dev/null 2>&1; \
|
echo "Installing to $$ext"; \
|
||||||
then cygpath -wa .; \
|
if which cygpath >/dev/null 2>&1; \
|
||||||
else pwd; \
|
then cygpath -wa .; \
|
||||||
|
else pwd; \
|
||||||
fi >"$$ext"
|
fi >"$$ext"
|
||||||
installxpi: xpi
|
installxpi: xpi
|
||||||
$(FIREFOX) $(XPI)
|
$(FIREFOX) $(XPI)
|
||||||
|
|||||||
@@ -624,7 +624,6 @@ const Editor = Module("editor", {
|
|||||||
mappings.add([modes.INSERT],
|
mappings.add([modes.INSERT],
|
||||||
["<Tab>"], "Expand insert mode abbreviation",
|
["<Tab>"], "Expand insert mode abbreviation",
|
||||||
function () {
|
function () {
|
||||||
util.dumpStack("\n\n\n<Tab>");
|
|
||||||
editor.expandAbbreviation(modes.INSERT);
|
editor.expandAbbreviation(modes.INSERT);
|
||||||
document.commandDispatcher.advanceFocus();
|
document.commandDispatcher.advanceFocus();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -263,8 +263,6 @@ const Hints = Module("hints", {
|
|||||||
win = this._top;
|
win = this._top;
|
||||||
|
|
||||||
let doc = win.document;
|
let doc = win.document;
|
||||||
if (!doc.body && !doc.document)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let [offsetX, offsetY] = this._getContainerOffsets(doc);
|
let [offsetX, offsetY] = this._getContainerOffsets(doc);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user