mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 23:47:16 +08:00
FIX: Allow IE script to load with a CDN
A proper fix would involve it being precompiled like other assets, but due to the conditional nature of the resource this is more complicated. For now this is better than IE being broken.
This commit is contained in:
@ -47,7 +47,7 @@ after_initialize do
|
||||
# to be loaded before other files
|
||||
register_html_builder('server:before-script-load') do |controller|
|
||||
if BrowserDetection.browser(controller.request.env['HTTP_USER_AGENT']) == :ie
|
||||
path = controller.helpers.script_asset_path('/plugins/discourse-internet-explorer/js/ie')
|
||||
path = "#{Discourse.base_uri}/plugins/discourse-internet-explorer/js/ie.js"
|
||||
|
||||
<<~JAVASCRIPT
|
||||
<script src="#{path}"></script>
|
||||
|
Reference in New Issue
Block a user