MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
if (mw.config.get("wgAction") == "edit") { | if (mw.config.get("wgAction") == "edit") { | ||
mw.loader.load( 'https://codemirror.net/3/addon/comment/comment.js' ); | mw.loader.load( 'https://codemirror.net/3/addon/comment/comment.js' ); | ||
const customKeyMap = { | const customKeyMap = { | ||
"Ctrl-/": "toggleComment" | "Ctrl-/": "toggleComment" | ||
}; | }; | ||
CodeMirror.keyMap.pcDefault[ 'Ctrl-/' ] = "toggleComment"; | |||
} | } |