1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 17:55:46 +01:00

8 Commits

Author SHA1 Message Date
d4b7e64470 Ported fixes for PM-28.6
Ported fixes from
https://github.com/RFDAJE/pentadactyl/tree/fix-palemoon-28.6
2019-07-08 18:26:34 +02:00
Jack Rosenthal
0a05e0089b protocol: make RedirectChannel compatible with PM 28.5
The sketchy meta-redirect previously used was no longer working with
Palemoon 28.5. This is an even more sketchy version that uses a
JavaScript redirect, but seems to work.

This redirect screws up the history, so this introduces a new bug as
well :/

My XPCOM-fu isn't quite good enough to figure out a nice way to
redirect a channel without this crap, so open to suggestions on a more
elegant way to solve this.

BUG=madand#9
TEST=visited dactyl://help-tag/starting and got to the correct page

Signed-off-by: Jack Rosenthal <jack@rosenth.al>
2019-05-12 08:38:16 -06:00
Jack Rosenthal
00536f5feb Palemoon 28.5 compatibility
This is a patch for compatibility with PM 28.5 based on Billylll@'s
patch posted to madand#7.
2019-05-05 15:40:19 -06:00
MadAnd
4b81d89a3e Add notice about reporting issues 2017-07-06 15:09:17 +03:00
MadAnd
9069da69e6 Re-apply "Explicitly disable multiprocess Firefox"
9584f6d1be
2017-01-26 21:23:46 +02:00
MadAnd
834077f282 Add link to page at Pale Moon Addons 2017-01-23 04:40:53 +02:00
MadAnd
864482cd7b Release 1.2pre-pm-3 2017-01-23 04:13:03 +02:00
Zheng Chaoping
0a46c4be52 Cherry pick 5digits/dactyl#178
Fix `TypeError: options is undefined`

When open a new window and close it, then press `gg` in the original window
will throw `TypeError: options is undefined`.
2017-01-23 04:10:23 +02:00
9 changed files with 45 additions and 32 deletions

View File

@@ -6,7 +6,14 @@ This is a port of one of the best XUL-based Firefox extensions, targeting [Pale
Install Install
------- -------
You can find the latest XPI file for download [here](https://github.com/madand/pentadactyl-pm/releases/latest). For older versions see the [Releases](https://github.com/madand/pentadactyl-pm/releases) page. The recommended way to install is via the download button at the Pale Moon Addons website [page](https://addons.palemoon.org/extensions/pentadactyl/). Installed this way, the extension could be updated automatically by the browser.
Alternatively, you can always find XPI files and source code of all releases at the [Releases](https://github.com/madand/pentadactyl-pm/releases) page.
Reporting issues
----------------
This repo is intended only to fix Pale Moon specific compatibility issues. If you have a general feature request or found a non-PaleMoon-specific bug, please report them [upstream](https://github.com/5digits/dactyl).
Development Development
----------- -----------

View File

@@ -1932,7 +1932,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
dactyl.log(_("dactyl.modulesLoaded"), 3); dactyl.log(_("dactyl.modulesLoaded"), 3);
userContext.DOM = Class("DOM", DOM, { userContext.DOM = Class("DOM", DOM, {
init(sel, ctxt) { init: function init(sel, ctxt) {
return DOM(sel, ctxt || buffer.focusedFrame.document); return DOM(sel, ctxt || buffer.focusedFrame.document);
} }
}); });
@@ -2069,13 +2069,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
statusline.update(); statusline.update();
dactyl.log(_("dactyl.initialized", config.appName), 0); dactyl.log(_("dactyl.initialized", config.appName), 0);
dactyl.initialized = true; dactyl.initialized = true;
util.delay(() => {
if (services.focus.activeWindow === window)
overlay.activeWindow = window;
util.flushLateMethods(dactyl);
});
} }
}); });

View File

@@ -618,9 +618,6 @@ var Events = Module("events", {
util.trapErrors("addEditActionListener", util.trapErrors("addEditActionListener",
DOM(elem).editor, editor); DOM(elem).editor, editor);
if (elem == window)
overlay.activeWindow = window;
overlay.setData(elem, "had-focus", true); overlay.setData(elem, "had-focus", true);
if (event.target instanceof Ci.nsIDOMXULTextBoxElement) if (event.target instanceof Ci.nsIDOMXULTextBoxElement)
if (Events.isHidden(elem, true)) if (Events.isHidden(elem, true))
@@ -873,6 +870,12 @@ var Events = Module("events", {
autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen }); autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen });
} }
statusline.updateZoomLevel(); statusline.updateZoomLevel();
},
activate: function onActivate(event) {
if (event.target === window) {
overlay.activeWindow = window;
}
} }
}, },

View File

@@ -7,7 +7,7 @@
"use strict"; "use strict";
var MOW = Module("mow", { var MOW = Module("mow", {
init() { init: function init() {
let proxy = new Proxy(this, { let proxy = new Proxy(this, {
get(target, prop, receiver) { get(target, prop, receiver) {
if (prop in target) if (prop in target)

View File

@@ -1815,7 +1815,7 @@ update(iter, {
}); });
var Iter = Class("Iter", { var Iter = Class("Iter", {
init(iter) { init: function (iter) {
this.iter = iter; this.iter = iter;
if (!(Symbol.iterator in iter) && "__iterator__" in iter) if (!(Symbol.iterator in iter) && "__iterator__" in iter)
this.iter = iter.__iterator__(); this.iter = iter.__iterator__();
@@ -1826,9 +1826,9 @@ var Iter = Class("Iter", {
}; };
}, },
next() { return this.iter.next() }, next: function () { return this.iter.next() },
send() { return apply(this.iter, "send", arguments) }, send: function () { return apply(this.iter, "send", arguments) },
"@@iterator": function () { return this.iter }, "@@iterator": function () { return this.iter },

View File

@@ -1737,10 +1737,8 @@ var Buffer = Module("Buffer", {
let timers = new WeakMap; let timers = new WeakMap;
return function smoothScrollTo(node, x, y) { return function smoothScrollTo(node, x, y) {
let { options } = overlay.activeModules; let time = overlay.activeModules["scrolltime"];
let steps = overlay.activeModules["scrollsteps"];
let time = options["scrolltime"];
let steps = options["scrollsteps"];
let elem = Buffer.Scrollable(node); let elem = Buffer.Scrollable(node);
@@ -2420,7 +2418,13 @@ var Buffer = Module("Buffer", {
let elements = Array.from(frames) let elements = Array.from(frames)
.flatMap(win => DOM.XPath(xpath, win.document)) .flatMap(win => DOM.XPath(xpath, win.document))
.filter(elem => { .flatMap(elems => {
var _tmp=[];
for(var i=0; i<elems.snapshotLength; i++) {
_tmp.push(elems.snapshotItem(i));
}
return _tmp;
}).filter(elem => {
if (isinstance(elem, [Ci.nsIDOMHTMLFrameElement, if (isinstance(elem, [Ci.nsIDOMHTMLFrameElement,
Ci.nsIDOMHTMLIFrameElement])) Ci.nsIDOMHTMLIFrameElement]))
@@ -2428,7 +2432,7 @@ var Buffer = Module("Buffer", {
elem = DOM(elem); elem = DOM(elem);
if (elem[0].readOnly || elem[0].disabled || !DOM(elem).isEditable) if (!elem || !elem.length || elem[0].readOnly || elem[0].disabled || !DOM(elem).isEditable)
return false; return false;
let style = elem.style; let style = elem.style;

View File

@@ -476,7 +476,7 @@ var Ex = Module("Ex", {
commands: null, commands: null,
init() { init: function () {
let proxy = new Proxy(this, { let proxy = new Proxy(this, {
get(target, prop, receiver) { get(target, prop, receiver) {
if (prop === "isProxy") if (prop === "isProxy")
@@ -494,7 +494,7 @@ var Ex = Module("Ex", {
return proxy; return proxy;
}, },
_args(cmd, args) { _args: function(cmd, args) {
args = Array.slice(args); args = Array.slice(args);
let res = cmd.newArgs({ context: this.context }); let res = cmd.newArgs({ context: this.context });
@@ -522,7 +522,7 @@ var Ex = Module("Ex", {
return res; return res;
}, },
_complete(cmd) { _complete: function (cmd) {
return (context, func, obj, args) => { return (context, func, obj, args) => {
args = this._args(cmd, args); args = this._args(cmd, args);
args.completeArg = args.length - 1; args.completeArg = args.length - 1;
@@ -531,7 +531,7 @@ var Ex = Module("Ex", {
}; };
}, },
_run(name) { _run: function (name) {
const self = this; const self = this;
let cmd = this.commands.get(name); let cmd = this.commands.get(name);
util.assert(cmd, _("command.noSuch")); util.assert(cmd, _("command.noSuch"));
@@ -627,7 +627,7 @@ var CommandHive = Class("CommandHive", Contexts.Hive, {
extra.hive = this; extra.hive = this;
extra.parsedSpecs = Command.parseSpecs(specs); extra.parsedSpecs = Command.parseSpecs(specs);
let names = extra.parsedSpecs.flatMap(); let names = extra.parsedSpecs;
let name = names[0]; let name = names[0];
if (this.name != "builtin") { if (this.name != "builtin") {

View File

@@ -56,10 +56,15 @@ function NetError(orig, error) {
function RedirectChannel(to, orig, time, message) { function RedirectChannel(to, orig, time, message) {
let html = DOM.toXML( let html = DOM.toXML(
["html", {}, ["html", {},
["head", {}, ["head", {},
["meta", { "http-equiv": "Refresh", content: (time || 0) + ";" + to }]], ["script", {},
["body", {}, "setTimeout(function () { window.location = '"
["h2", { style: "text-align: center" }, message || ""]]]); + to
+ "'; }, "
+ ((time || 0) * 1000)
+ ");"]],
["body", {},
["h2", { style: "text-align: center" }, message || ""]]]);
return StringChannel(html, "text/html", services.io.newURI(to, null, null)); return StringChannel(html, "text/html", services.io.newURI(to, null, null));
} }

View File

@@ -5,10 +5,11 @@
em:id="pentadactyl@addons.palemoon.org" em:id="pentadactyl@addons.palemoon.org"
em:type="2" em:type="2"
em:name="Pentadactyl" em:name="Pentadactyl"
em:version="1.2pre-pm-2" em:version="1.2pre-pm-4"
em:description="Pale Moon for Vim and Links addicts" em:description="Pale Moon for Vim and Links addicts"
em:homepageURL="http://5digits.org/pentadactyl" em:homepageURL="http://5digits.org/pentadactyl"
em:bootstrap="true" em:bootstrap="true"
em:multiprocessCompatible="false"
em:strictCompatibility="true"> em:strictCompatibility="true">
<em:creator>Kris Maglione, Doug Kearns</em:creator> <em:creator>Kris Maglione, Doug Kearns</em:creator>