Skip to content

Commit 6563fca

Browse files
committed
User own settings injection
custom settings template in keys.js injectiono
1 parent e65cd27 commit 6563fca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

keys.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const actions = require("./actions")
22
const { categories } = require("./help")
3+
const custom = require("./conf.cust")
34

45
// Remove undesired default mappings
56
const unmaps = {
@@ -608,6 +609,12 @@ const maps = {
608609
],
609610
}
610611

612+
const customMaps = Object.entries(custom.maps || {})
613+
614+
customMaps.forEach((m) => {
615+
maps[m[0]] = (maps[m[0]] || []).concat(m[1])
616+
})
617+
611618
// Aliases
612619
const aliases = {
613620
"wikipedia.org": [
@@ -637,6 +644,8 @@ const aliases = {
637644
],
638645
}
639646

647+
Object.assign(aliases, custom.aliases || {})
648+
640649
module.exports = {
641650
unmaps,
642651
maps,

0 commit comments

Comments
 (0)