mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 12:22:27 +01:00
Fixed the completion display issues
Fat-arrow function syntax has a lexical `this`, which causes `this.groups` to be undefined, throwing an error upon sourcing. I believe this is because it's pulling the `this` variable from the object syntax constructor immediately surrounding it, instead of from the completion.noscriptSites function, but I'm not positive.
This commit is contained in:
@@ -188,8 +188,10 @@ completion.noscriptSites = function (context) {
|
||||
context.generate = getSites;
|
||||
context.keys = {
|
||||
text: util.identity,
|
||||
description: site => groupDesc[this.highlight] +
|
||||
(this.groups.untrusted && this.highlight != "NoScriptUntrusted" ? " (untrusted)" : ""),
|
||||
description: function (site) {
|
||||
return groupDesc[this.highlight] +
|
||||
(this.groups.untrusted && this.highlight != "NoScriptUntrusted" ? " (untrusted)" : "")
|
||||
},
|
||||
|
||||
highlight: function (site) {
|
||||
return this.groups.temp ? "NoScriptTemp" :
|
||||
|
||||
Reference in New Issue
Block a user