mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-30 09:53:34 +02:00
Fix some stupid bugs in newer JägerMonkey. Closes issue #86.
This commit is contained in:
@@ -147,11 +147,13 @@ const Highlights = Module("Highlight", {
|
||||
*
|
||||
* @param {string} class
|
||||
*/
|
||||
selector: function (class_)
|
||||
class_.replace(/(^|\s)([A-Z]\w+)\b/g,
|
||||
selector: function (class_) {
|
||||
const self = this;
|
||||
return class_.replace(/(^|\s)([A-Z]\w+)\b/g,
|
||||
function (m, n1, hl) n1 +
|
||||
(this.highlight[hl] && this.highlight[hl].class != class_
|
||||
? this.highlight[hl] : "[dactyl|highlight~=" + hl + "]")),
|
||||
(self.highlight[hl] && self.highlight[hl].class != class_
|
||||
? self.highlight[hl] : "[dactyl|highlight~=" + hl + "]"));
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears all highlighting rules. Rules with default values are
|
||||
|
||||
@@ -282,7 +282,7 @@ const File = Class("File", {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
let self = XPCSafeJSObjectWrapper(file);
|
||||
let self = XPCNativeWrapper(file);
|
||||
self.__proto__ = File.prototype;
|
||||
return self;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user