Ares-X
(AresX)
Março 15, 2020, 4:18am
1
Versão do Discourse: 2.4.1
Atualizei o Discourse para a versão mais recente e percebi que alguns scripts JavaScript adicionados na tag <head> não aparecem no código-fonte HTML.
Por exemplo, o script do Google Analytics foi adicionado em “Editar CSS/HTML”.
Por que isso acontece? Estou muito confuso.
Ares-X
(AresX)
Março 15, 2020, 4:32am
2
if i make the <script> wrong ,such as <script123> , then those code will show
if i change it back to normal <script>, disappear again
Johani
(Joe)
Março 15, 2020, 5:04am
3
It does not “disappear” it’s still there. What happens is that we pull all inline scripts and put them in one file for your theme.
discourse/app/models/theme_field.rb at main · discourse/discourse · GitHub
So, if you search the page-source for theme-javascript you should see something like this
This file will contain all of your inline scripts.
Also, Discourse has native support for Google Analytics, so why not use that?
Search the settings for Analytics
11 curtidas
system
(system)
Fechado
Março 9, 2024, 8:11am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.