mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-17 17:55:46 +01:00
Compare commits
11 Commits
pentadacty
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d4b7e64470 | |||
|
|
0a05e0089b | ||
|
|
00536f5feb | ||
|
|
4b81d89a3e | ||
|
|
9069da69e6 | ||
|
|
834077f282 | ||
|
|
864482cd7b | ||
|
|
0a46c4be52 | ||
|
|
1910720de8 | ||
|
|
44563c4a85 | ||
|
|
7f44847ee3 |
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
Pentadactyl for Pale Moon
|
||||
=========================
|
||||
|
||||
This is a port of one of the best XUL-based Firefox extensions, targeting [Pale Moon](https://www.palemoon.org/) 27. The goal of this project is to make Pentadactyl compatible with Pale Moon, while staying as close to the upstream as possible.
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
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
|
||||
-----------
|
||||
|
||||
### Build XPI from sources ###
|
||||
|
||||
``` shell
|
||||
git clone --depth 1000 https://github.com/madand/pentadactyl-pm.git
|
||||
cd pentadactyl-pm/
|
||||
make -C pentadactyl xpi
|
||||
```
|
||||
|
||||
This resulting XPI will be placed in the `downloads/` folder.
|
||||
|
||||
#### Build dependencies ####
|
||||
|
||||
* zip
|
||||
* gmake
|
||||
* Standard POSIX commands: awk, echo, sed, sh
|
||||
|
||||
While most developers use a Unix-like operating system, you can also build Pentadactyl on Windows with the help of MinGW's MSYS, Cygwin, or SFU.
|
||||
|
||||
### Install without XPI ###
|
||||
|
||||
As creating and installing a new XPI file after each update is cumbersome, most developers run Pentadactyl directly from their working copies. This is achieved with [Firefox extension proxy file][1], which is a plain text file named after the extension ID and its contents is just a path to the extension source directory.
|
||||
|
||||
Assuming you use the `default` profile, the following command will create the proxy file:
|
||||
|
||||
``` shell
|
||||
cd /path/to/cloned/pentadactyl-pm/
|
||||
# On clean profile, ensure that 'extensions' directory exists inside of the profile directory.
|
||||
echo "$(pwd)/pentadactyl" >~/'.moonchild productions/pale moon'/*.default/extensions/pentadactyl@addons.palemoon.org
|
||||
```
|
||||
|
||||
Once you installed Pentadactyl via the proxy file, restart the browser. Afterwards, you can use `:rehash` command to reload the extension without further browser restarts. Moreover, you can bind it to a key chord in your `~/.pentadactylrc`:
|
||||
|
||||
``` viml
|
||||
nmap -ex <C-r> :rehash
|
||||
```
|
||||
|
||||
[1]: https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment#Firefox_extension_proxy_file
|
||||
@@ -1932,7 +1932,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
dactyl.log(_("dactyl.modulesLoaded"), 3);
|
||||
|
||||
userContext.DOM = Class("DOM", DOM, {
|
||||
init(sel, ctxt) {
|
||||
init: function init(sel, ctxt) {
|
||||
return DOM(sel, ctxt || buffer.focusedFrame.document);
|
||||
}
|
||||
});
|
||||
@@ -2069,13 +2069,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
statusline.update();
|
||||
dactyl.log(_("dactyl.initialized", config.appName), 0);
|
||||
dactyl.initialized = true;
|
||||
|
||||
util.delay(() => {
|
||||
if (services.focus.activeWindow === window)
|
||||
overlay.activeWindow = window;
|
||||
|
||||
util.flushLateMethods(dactyl);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -618,9 +618,6 @@ var Events = Module("events", {
|
||||
util.trapErrors("addEditActionListener",
|
||||
DOM(elem).editor, editor);
|
||||
|
||||
if (elem == window)
|
||||
overlay.activeWindow = window;
|
||||
|
||||
overlay.setData(elem, "had-focus", true);
|
||||
if (event.target instanceof Ci.nsIDOMXULTextBoxElement)
|
||||
if (Events.isHidden(elem, true))
|
||||
@@ -873,6 +870,12 @@ var Events = Module("events", {
|
||||
autocommands.trigger("Fullscreen", { url: this._fullscreen ? "on" : "off", state: this._fullscreen });
|
||||
}
|
||||
statusline.updateZoomLevel();
|
||||
},
|
||||
|
||||
activate: function onActivate(event) {
|
||||
if (event.target === window) {
|
||||
overlay.activeWindow = window;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"use strict";
|
||||
|
||||
var MOW = Module("mow", {
|
||||
init() {
|
||||
init: function init() {
|
||||
let proxy = new Proxy(this, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop in target)
|
||||
|
||||
@@ -1815,7 +1815,7 @@ update(iter, {
|
||||
});
|
||||
|
||||
var Iter = Class("Iter", {
|
||||
init(iter) {
|
||||
init: function (iter) {
|
||||
this.iter = iter;
|
||||
if (!(Symbol.iterator in iter) && "__iterator__" in iter)
|
||||
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 },
|
||||
|
||||
|
||||
@@ -1737,10 +1737,8 @@ var Buffer = Module("Buffer", {
|
||||
let timers = new WeakMap;
|
||||
|
||||
return function smoothScrollTo(node, x, y) {
|
||||
let { options } = overlay.activeModules;
|
||||
|
||||
let time = options["scrolltime"];
|
||||
let steps = options["scrollsteps"];
|
||||
let time = overlay.activeModules["scrolltime"];
|
||||
let steps = overlay.activeModules["scrollsteps"];
|
||||
|
||||
let elem = Buffer.Scrollable(node);
|
||||
|
||||
@@ -2420,7 +2418,13 @@ var Buffer = Module("Buffer", {
|
||||
|
||||
let elements = Array.from(frames)
|
||||
.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,
|
||||
Ci.nsIDOMHTMLIFrameElement]))
|
||||
@@ -2428,7 +2432,7 @@ var Buffer = Module("Buffer", {
|
||||
|
||||
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;
|
||||
|
||||
let style = elem.style;
|
||||
|
||||
@@ -476,7 +476,7 @@ var Ex = Module("Ex", {
|
||||
|
||||
commands: null,
|
||||
|
||||
init() {
|
||||
init: function () {
|
||||
let proxy = new Proxy(this, {
|
||||
get(target, prop, receiver) {
|
||||
if (prop === "isProxy")
|
||||
@@ -494,7 +494,7 @@ var Ex = Module("Ex", {
|
||||
return proxy;
|
||||
},
|
||||
|
||||
_args(cmd, args) {
|
||||
_args: function(cmd, args) {
|
||||
args = Array.slice(args);
|
||||
|
||||
let res = cmd.newArgs({ context: this.context });
|
||||
@@ -522,7 +522,7 @@ var Ex = Module("Ex", {
|
||||
return res;
|
||||
},
|
||||
|
||||
_complete(cmd) {
|
||||
_complete: function (cmd) {
|
||||
return (context, func, obj, args) => {
|
||||
args = this._args(cmd, args);
|
||||
args.completeArg = args.length - 1;
|
||||
@@ -531,7 +531,7 @@ var Ex = Module("Ex", {
|
||||
};
|
||||
},
|
||||
|
||||
_run(name) {
|
||||
_run: function (name) {
|
||||
const self = this;
|
||||
let cmd = this.commands.get(name);
|
||||
util.assert(cmd, _("command.noSuch"));
|
||||
@@ -627,7 +627,7 @@ var CommandHive = Class("CommandHive", Contexts.Hive, {
|
||||
extra.hive = this;
|
||||
extra.parsedSpecs = Command.parseSpecs(specs);
|
||||
|
||||
let names = extra.parsedSpecs.flatMap();
|
||||
let names = extra.parsedSpecs;
|
||||
let name = names[0];
|
||||
|
||||
if (this.name != "builtin") {
|
||||
|
||||
@@ -56,10 +56,15 @@ function NetError(orig, error) {
|
||||
function RedirectChannel(to, orig, time, message) {
|
||||
let html = DOM.toXML(
|
||||
["html", {},
|
||||
["head", {},
|
||||
["meta", { "http-equiv": "Refresh", content: (time || 0) + ";" + to }]],
|
||||
["body", {},
|
||||
["h2", { style: "text-align: center" }, message || ""]]]);
|
||||
["head", {},
|
||||
["script", {},
|
||||
"setTimeout(function () { window.location = '"
|
||||
+ to
|
||||
+ "'; }, "
|
||||
+ ((time || 0) * 1000)
|
||||
+ ");"]],
|
||||
["body", {},
|
||||
["h2", { style: "text-align: center" }, message || ""]]]);
|
||||
return StringChannel(html, "text/html", services.io.newURI(to, null, null));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
em:id="pentadactyl@addons.palemoon.org"
|
||||
em:type="2"
|
||||
em:name="Pentadactyl"
|
||||
em:version="1.2pre-pm-1"
|
||||
em:version="1.2pre-pm-4"
|
||||
em:description="Pale Moon for Vim and Links addicts"
|
||||
em:homepageURL="http://5digits.org/pentadactyl"
|
||||
em:bootstrap="true"
|
||||
em:multiprocessCompatible="false"
|
||||
em:strictCompatibility="true">
|
||||
|
||||
<em:creator>Kris Maglione, Doug Kearns</em:creator>
|
||||
@@ -31,7 +32,7 @@
|
||||
|
||||
<em:targetApplication>
|
||||
<Description
|
||||
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
em:id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}"
|
||||
em:minVersion="27.0"
|
||||
em:maxVersion="50.*"/>
|
||||
</em:targetApplication>
|
||||
|
||||
Reference in New Issue
Block a user