mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Load translation overrides without JS eval
This commit is contained in:
@@ -93,9 +93,14 @@ module ApplicationHelper
|
||||
|
||||
def preload_script(script)
|
||||
path = script_asset_path(script)
|
||||
preload_script_url(path)
|
||||
end
|
||||
|
||||
"<link rel='preload' href='#{path}' as='script'/>
|
||||
<script src='#{path}'></script>".html_safe
|
||||
def preload_script_url(url)
|
||||
<<~HTML.html_safe
|
||||
<link rel="preload" href="#{url}" as="script">
|
||||
<script src="#{url}"></script>
|
||||
HTML
|
||||
end
|
||||
|
||||
def discourse_csrf_tags
|
||||
|
||||
Reference in New Issue
Block a user