mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-29 12:55:46 +01:00
Fix unnecessary loading of highlight.jsm whenever a help page is loaded.
This commit is contained in:
@@ -169,11 +169,12 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
],
|
],
|
||||||
|
|
||||||
styleHelp: function styleHelp() {
|
styleHelp: function styleHelp() {
|
||||||
const { highlight } = require("highlight");
|
if (!this.helpStyled) {
|
||||||
if (!this.helpStyled)
|
const { highlight } = require("highlight");
|
||||||
for (let k in keys(highlight.loaded))
|
for (let k in keys(highlight.loaded))
|
||||||
if (/^(Help|StatusLine)|^(Boolean|Indicator|MoreMsg|Number|Logo|Key(word)?|String)$/.test(k))
|
if (/^(Help|StatusLine)|^(Boolean|Indicator|MoreMsg|Number|Logo|Key(word)?|String)$/.test(k))
|
||||||
highlight.loaded[k] = true;
|
highlight.loaded[k] = true;
|
||||||
|
}
|
||||||
this.helpCSS = true;
|
this.helpCSS = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user