mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 01:27:59 +01:00
Fix generating incorrect help pages on Firefox 4.
This commit is contained in:
@@ -311,7 +311,7 @@ var Buffer = Module("buffer", {
|
|||||||
allFrames: function allFrames(win, focusedFirst) {
|
allFrames: function allFrames(win, focusedFirst) {
|
||||||
let frames = [];
|
let frames = [];
|
||||||
(function rec(frame) {
|
(function rec(frame) {
|
||||||
if (frame.document.body instanceof HTMLBodyElement)
|
if (true || frame.document.body instanceof HTMLBodyElement)
|
||||||
frames.push(frame);
|
frames.push(frame);
|
||||||
Array.forEach(frame.frames, rec);
|
Array.forEach(frame.frames, rec);
|
||||||
})(win || content);
|
})(win || content);
|
||||||
|
|||||||
@@ -871,7 +871,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
value = "hl-" + value;
|
value = "hl-" + value;
|
||||||
}
|
}
|
||||||
if (name == "href") {
|
if (name == "href") {
|
||||||
value = node.href;
|
value = node.href || value;
|
||||||
if (value.indexOf("dactyl://help-tag/") == 0) {
|
if (value.indexOf("dactyl://help-tag/") == 0) {
|
||||||
let uri = services.io.newChannel(value, null, null).originalURI;
|
let uri = services.io.newChannel(value, null, null).originalURI;
|
||||||
value = uri.spec == value ? "javascript:;" : uri.path.substr(1);
|
value = uri.spec == value ? "javascript:;" : uri.path.substr(1);
|
||||||
@@ -907,8 +907,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
let chromeFiles = {};
|
let chromeFiles = {};
|
||||||
let styles = {};
|
let styles = {};
|
||||||
for (let [file, ] in Iterator(services["dactyl:"].FILE_MAP)) {
|
for (let [file, ] in Iterator(services["dactyl:"].FILE_MAP)) {
|
||||||
dactyl.open("dactyl://help/" + file);
|
let url = "dactyl://help/" + file;
|
||||||
dactyl.modules.events.waitForPageLoad();
|
dactyl.open(url);
|
||||||
|
util.waitFor(function () content.location.href == url, 5000);
|
||||||
|
events.waitForPageLoad();
|
||||||
var data = [
|
var data = [
|
||||||
'<?xml version="1.0" encoding="UTF-8"?>\n',
|
'<?xml version="1.0" encoding="UTF-8"?>\n',
|
||||||
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n',
|
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n',
|
||||||
|
|||||||
@@ -1055,11 +1055,12 @@ var Events = Module("events", {
|
|||||||
if (buffer.loaded)
|
if (buffer.loaded)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
dactyl.echo(_("macro.loadWaiting"), commandline.DISALLOW_MULTILINE);
|
dactyl.echo(_("macro.loadWaiting"), commandline.FORCE_SINGLELINE);
|
||||||
|
|
||||||
const maxWaitTime = (time || 25);
|
const maxWaitTime = (time || 25);
|
||||||
util.waitFor(function () !events.feedingKeys || buffer.loaded, this, maxWaitTime * 1000, true);
|
util.waitFor(function () buffer.loaded, this, maxWaitTime * 1000, true);
|
||||||
|
|
||||||
|
dactyl.echo("", commandline.FORCE_SINGLELINE);
|
||||||
if (!buffer.loaded)
|
if (!buffer.loaded)
|
||||||
dactyl.echoerr(_("macro.loadFailed", maxWaitTime));
|
dactyl.echoerr(_("macro.loadFailed", maxWaitTime));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user