Trying to use “Layout > Custom Scripts > Custom Script for Logged In Users” on the admin page while using rocketchat. However, even if I enter the JavaScript code, I have to refresh the page for it to work.
For example
if(window.location.pathname == ‘/account/profile’){ alert(“Welcome”)
} code, it doesn’t work when you move to the page. It works only when I refresh the page. How to solve this problem?
Server Setup Information:
- Version of Rocket.Chat Server: 4.7.0
- Operating System: ubuntu 20.04
- Deployment Method: tar
- Number of Running Instances: 1
- DB Replicaset Oplog: enable oplog
- NodeJS Version: 14.18.3
- MongoDB Version: 5.0.15