Hey Tet, I found the following Custom HTML from another Atlassian Answer that another person created:
This script works for the "Demonstration Space" (which has a spaceKey of "ds") that ships wiith Confluence
Browse to Confluence Admin | Look and Feel | Custom HTML
In At the end of the HEAD, paste:
<script> AJS.toInit(function($){ if (AJS.params.spaceKey == 'ds') { $('#login-link,#browse-menu-link').parent().hide(); // Hide the login & browse menu } }); </script>
Then Save.
Change the 'ds' bit to whatever the spaceKey is for your space.
This should work:
<script> AJS.toInit(function() { if (AJS.params.remoteUser == '') { AJS.$('#login-link').hide(); } }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This one worked for me as well
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephen,
I tried your method but it does not work. Actually I also tried this script which is working but it hides the whole menu bar from anonymous users:
<script>
AJS.toInit(function() {
if (AJS.params.remoteuser == '') {
AJS.$('header').hide();
}
});
</script>
How do I modify this script to just hide the login button in the menu bar. I would like to leave the rest (eg. quick search textbox) visible.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script that Guilherme linked to will block the login link for a particular space, but not from the dashboard.
This would probably work better:
<script> AJS.toInit(function($){ if (document.location.href.indexOf("dashboard.action") !== -1) { $("#login-link").parent().hide(); // Hide the login menu } }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.