mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 07:07:58 +01:00
Fix hints with content scripting disabled.
This commit is contained in:
@@ -14,11 +14,6 @@
|
||||
</binding>
|
||||
|
||||
<binding id="hints" inheritstyle="false">
|
||||
<implementation>
|
||||
<field name="hints">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "hints");
|
||||
</field>
|
||||
</implementation>
|
||||
<content>
|
||||
<html:div anonid="hints"/>
|
||||
</content>
|
||||
|
||||
@@ -291,6 +291,8 @@ const Hints = Module("hints", {
|
||||
if (body) {
|
||||
let fragment = util.xmlToDom(<div highlight="hints"/>, doc);
|
||||
body.appendChild(fragment);
|
||||
util.computedStyle(fragment).height; // Force application of binding.
|
||||
let container = doc.getAnonymousElementByAttribute(fragment, "anonid", "hints");
|
||||
|
||||
let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, doc);
|
||||
|
||||
@@ -326,7 +328,7 @@ const Hints = Module("hints", {
|
||||
|
||||
hint.span.style.left = leftPos + "px";
|
||||
hint.span.style.top = topPos + "px";
|
||||
fragment.wrappedJSObject.hints.appendChild(hint.span);
|
||||
container.appendChild(hint.span);
|
||||
|
||||
this._pageHints.push(hint);
|
||||
}
|
||||
@@ -421,7 +423,7 @@ const Hints = Module("hints", {
|
||||
if (!rect)
|
||||
continue;
|
||||
|
||||
hint.imgSpan = util.xmlToDom(<span highlight="Hint" dactyl:hl="HintImage"/>, doc);
|
||||
hint.imgSpan = util.xmlToDom(<span highlight="Hint" dactyl:hl="HintImage" xmlns:dactyl={NS}/>, doc);
|
||||
hint.imgSpan.style.left = (rect.left + offsetX) + "px";
|
||||
hint.imgSpan.style.top = (rect.top + offsetY) + "px";
|
||||
hint.imgSpan.style.width = (rect.right - rect.left) + "px";
|
||||
|
||||
Reference in New Issue
Block a user