Links to online documentation:
* Adding a help button on top of the chat, that links to the online documentation on frama.io. * Replaced github.io documentation links by frama.io documentation. * Adding links to the documentation in the diagnostic tool.
This commit is contained in:
17
shared/lib/help.ts
Normal file
17
shared/lib/help.ts
Normal file
@ -0,0 +1,17 @@
|
||||
function helpUrl (options: {
|
||||
lang?: string
|
||||
page?: string
|
||||
}): string {
|
||||
let url = 'https://livingston.frama.io/peertube-plugin-livechat/'
|
||||
if (options.lang && /^[a-zA-Z_-]+$/.test(options.lang)) {
|
||||
url = url + options.lang + '/'
|
||||
}
|
||||
if (options.page && /^[\w/-]+$/.test(options.page)) {
|
||||
url = url + options.page + '/'
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
export {
|
||||
helpUrl
|
||||
}
|
Reference in New Issue
Block a user