Load shoutbox UI scripts only when the shoutbox is displayed
This commit is contained in:
parent
0b524f19b7
commit
e41bfaddff
|
@ -5,7 +5,12 @@ from app.utils.render import render
|
|||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render('index.html', styles=["+css/homepage.css"])
|
||||
return render('index.html',
|
||||
styles=["+css/homepage.css"],
|
||||
scripts=[
|
||||
"+scripts/v5shoutbox_ui.js",
|
||||
"+scripts/v5shoutbox.js"
|
||||
])
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
|
|
|
@ -33,8 +33,6 @@ def render(*args, styles=[], scripts=[], modules=[], **kwargs):
|
|||
'scripts/tag_selector.js',
|
||||
'scripts/editor.js',
|
||||
'scripts/v5shoutbox_irc.js',
|
||||
'scripts/v5shoutbox_ui.js',
|
||||
'scripts/v5shoutbox.js',
|
||||
]
|
||||
modules_ = [
|
||||
'scripts/emoji-picker-element/index.js',
|
||||
|
|
Loading…
Reference in New Issue