Common trick for saving some meta-data about the web app and the currently logged in user is used.
There are a few utility functions that can be useful:
<meta name="ajs-context-path" content="/wiki"> <meta name="ajs-version-number" content="3.6.0"> <meta name="ajs-build-number" content="XXX"> <meta name="ajs-remote-user" content="someusername"> <meta name="ajs-static-resource-url-prefix" content="/confluence/s/en/2155/5/_">
AJS.Data.get("some key") ex.AJS.Data.get("remote-user")
and if you want to see list of all available params in FireBug console just write
AJS.params.somekey ex. AJS.params.loggedInUser
AJS.paramsand magic happens. You can get info about the current user's username, the locale or the app context path. Please note the depending on the version and the app that you are using like Confuence, Jira or other you will get a lot of params in the list that are version or app specific.