1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-19 22:17:59 +01:00

Toggle strictCompatibility bit.

This commit is contained in:
Kris Maglione
2012-02-09 17:32:07 -05:00
parent 2a154ebd7b
commit caa7e8a1b3
3 changed files with 14 additions and 7 deletions

View File

@@ -301,6 +301,7 @@ var HintSession = Class("HintSession", CommandMode, {
if (!rect.width || !rect.height)
if (!Array.some(elem.childNodes, function (elem) elem instanceof Element && DOM(elem).style.float != "none" && isVisible(elem)))
if (elem.textContent || !elem.name)
return false;
let computedStyle = doc.defaultView.getComputedStyle(elem, null);
@@ -763,7 +764,7 @@ var Hints = Module("hints", {
this.addMode("Y", "Yank hint description", function (elem) editor.setRegister(null, elem.textContent || "", true));
this.addMode("A", "Yank hint anchor url", function (elem) {
let uri = elem.ownerDocument.documentURIObject.clone();
uri.ref = elem.id;
uri.ref = elem.id || elem.name;
dactyl.clipboardWrite(uri.spec, true);
});
this.addMode("c", "Open context menu", function (elem) DOM(elem).contextmenu());
@@ -1276,7 +1277,7 @@ var Hints = Module("hints", {
"regexpmap", {
"[iI]": "img",
"[asOTvVWy]": [":-moz-any-link", "area[href]", "img[src]", "iframe[src]"],
"[A]": ["[id],a[name]"],
"[A]": ["[id]", "a[name]"],
"[f]": "body",
"[F]": ["body", "code", "div", "html", "p", "pre", "span"],
"[S]": ["input:not([type=hidden])", "textarea", "button", "select"]

View File

@@ -123,8 +123,9 @@ else
},
cleanup: function unregister() {
for each (let factory in this.factories.splice(0))
for each (let factory in this.factories)
this.manager.unregisterFactory(factory.classID, factory);
this.factories = {};
},
purge: function purge() {
@@ -185,11 +186,15 @@ else
}),
registerFactory: function registerFactory(factory) {
if (Set.has(this.factories, factory.contractID))
this.manager.unregisterFactory(this.factories[factory.contractID].classID,
this.factories[factory.contractID]);
this.manager.registerFactory(factory.classID,
String(factory.classID),
factory.contractID,
factory);
this.factories.push(factory);
this.factories[factory.contractID] = factory;
}
};

View File

@@ -8,7 +8,8 @@
em:version="1.0rc2pre"
em:description="Firefox for Vim and Links addicts"
em:homepageURL="http://dactyl.sourceforge.net/pentadactyl"
em:bootstrap="true">
em:bootstrap="true"
em:strictCompatibility="true">
<em:creator>Kris Maglione, Doug Kearns</em:creator>
<em:developer>Kris Maglione</em:developer>
@@ -31,7 +32,7 @@
<Description
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="3.6"
em:maxVersion="11.*"/>
em:maxVersion="13.*"/>
</em:targetApplication>
</Description>
</RDF>