Skip to content

Commit

Permalink
User own settings injection
Browse files Browse the repository at this point in the history
custom settings template in keys.js injectiono
  • Loading branch information
Kudlaty01 committed Oct 18, 2019
1 parent 0453d1e commit 921c9be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions keys.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const actions = require("./actions")
const { categories } = require("./help")
const custom = require("./custom")

// Remove undesired default mappings
const unmaps = {
Expand Down Expand Up @@ -608,6 +609,12 @@ const maps = {
],
}

const customMaps = Object.entries(custom.maps || {})

customMaps.forEach((m) => {
maps[m[0]] = (maps[m[0]] || []).concat(m[1])
})

// Aliases
const aliases = {
"wikipedia.org": [
Expand Down Expand Up @@ -637,6 +644,8 @@ const aliases = {
],
}

Object.assign(aliases, custom.aliases || {})

module.exports = {
unmaps,
maps,
Expand Down

0 comments on commit 921c9be

Please sign in to comment.