mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Inject isOverleaf setting globally
This commit is contained in:
@@ -333,3 +333,7 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
||||
defaultLineHeight : if isOl then 'normal' else 'compact'
|
||||
renderAnnouncements : !isOl
|
||||
next()
|
||||
|
||||
webRouter.use (req, res, next) ->
|
||||
res.locals.exposedSettings =
|
||||
isOverleaf: Settings.overleaf?
|
||||
|
||||
@@ -70,6 +70,7 @@ html(itemscope, itemtype='http://schema.org/Product')
|
||||
window.systemMessages = !{JSON.stringify(systemMessages).replace(/\//g, '\\/')};
|
||||
window.ab = {};
|
||||
window.user_id = '#{getLoggedInUserId()}';
|
||||
window.exposedSettings = JSON.parse('!{JSON.stringify(exposedSettings).replace(/\//g, "\\/")}');
|
||||
|
||||
- if (typeof(settings.algolia) != "undefined")
|
||||
script.
|
||||
|
||||
Reference in New Issue
Block a user