mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Inject isOverleaf setting globally
This commit is contained in:
parent
d7a341f59b
commit
085c2529d9
2 changed files with 5 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue