Forum Discussion

PerBonomi's avatar
9 years ago

Save yourself 20 seconds

I got a bit tired of trying to remember what URLs to use so I put this in the footer for myself.

Thought I'd share.

Now all I have to do is open the console and I'll know the Freemarker and Community versions we're on.

 

<#if !user.anonymous>
	<#if user.login == "Per">
		<#assign currentVersion = restadmin("/settings/name/maintenance.current_version").value/>
		<script>
		var objCommVersion = JSON.parse('${currentVersion}');
		console.log('Hello ${user.login}!\n\n');
		console.log('Versions:');
		console.log('Freemarker: ${.version}');
		console.log('Community: ' + objCommVersion.version.major + '.' + objCommVersion.version.minor + '.' + objCommVersion.version.point);
		</script>
	</#if>
</#if>