Discourse Meta
自定义 JavaScript 仅在刷新后应用,为位置插件创建类别
开发
NateDhaliwal
(Nate Dhaliwal)
2025 年8 月 13 日 00:00
2
如果我没记错的话,因为 Discourse 是一个单页应用程序,我认为您必须使用插件 API 的
api.onPageChange()
来实现此目的。
在话题中显示帖子
相关话题
话题
回复
浏览量
活动
[newbie] Trouble adding script to dynamically change CSS values based on conditions
Product Support
9
1827
2016 年10 月 11 日
Javascript added to theme header returns $ is not defined
Development
4
206
2025 年6 月 24 日
Modernizing inline script tags for templates & JS API
Development
dev-news
46
6026
2026 年3 月 25 日
Cache busting for updated scripts in theme components?
Development
0
585
2022 年10 月 27 日
Difficulties in correctly adding external JavaScript
Product Support
3
3018
2019 年11 月 5 日