mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 18:17:58 +01:00
Bloody hell.
This commit is contained in:
@@ -781,10 +781,16 @@ var Hints = Module("hints", {
|
||||
* @optional
|
||||
*/
|
||||
addMode: function (mode, prompt, action, filter, tags) {
|
||||
function toString(regexp) RegExp.prototype.toString.call(regexp);
|
||||
|
||||
if (tags != null) {
|
||||
let eht = options.get("extendedhinttags");
|
||||
let update = eht.isDefault;
|
||||
eht.stringDefaultValue += "," + Option.quote(util.regexp.escape(mode)) + ":" + tags.map(Option.quote);
|
||||
|
||||
let value = eht.parse(Option.quote(util.regexp.escape(mode)) + ":" + tags.map(Option.quote))[0];
|
||||
eht.defaultValue = eht.defaultValue.filter(function (re) toString(re) != toString(value))
|
||||
.concat(value);
|
||||
|
||||
if (update)
|
||||
eht.reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user