Blog Post
Visual "Poke-in-the-eye" when loged in as siteadmin
If you are anything like me, you would like to have a poke-in-the-eye notification that you are currently logged in as a site admin. In my office, siteadmin doesn't contribute with content, just manages the creation of spaces, deleting trash and basic site setup tasks. In such case, some of use ... a double login. Our own login, and a siteadmin login. To help us prevent leaving content as a siteadmin we implemented this script to show us that we are loged in as site admin:
<script type="text/javascript">
<!--
/* HELPFUL FUNCTIONS */
function is_siteadmin () {
$item = $('img#myareaavatarimg').closest('a');
return ($item.attr('rel').length - $item.attr('rel').lastIndexOf('siteadmin') == 9);
}
/* RUN MAIN FUNCTION */
$(document).ready(function () {
if (is_siteadmin ())
{
/*COLOR BACKGROUND TO DARK RED TO MAKE IT MORE VISIBLE A SITE ADMIN IS LOGGED IN*/
$('body')
.css('background-image','none')
.css('background-color','#882222');
}
});
-->
</script>
Just go to Site Settings as siteadmin and copy-paste the above code to your JavaScript for web statistics support section.
Just thought to share this with people that wanna have this :)
How to instantly see that you are logged in as a site admin?

Status Log
Wiki

Also wondering, wouldn't this be more efficient if we did it template side instead of JS?
Screen shoot coming up
This is really cool! I too am logged in our sites as the site admin multiple times and invariably end up posting. This is a great way to alert the user that s/he is logged in as an admin. Good job!
Rated +1 !!
I agree with apurva, perhaps the admin's background color can be set as a parameter of site configuration.
@iamlaozhao... how ever developers plan to implement this in future (if they wish) is fine with me... I just found a quick solution that I know how to implement for this idea :) It even came to that that I almost wrote a script to make a floating box in a bottom right corner of a window to say something like "ADMIN LOGIN" :D... ofcourse in a big red letters :D... but thought that would be a bit overdoing it :)
Potential flaw in this implementation, btw ( not a big one, though ) - this would only work for the siteadmin user, perhaps a better check would be to find the Administration link in the left navigation in your is_siteadmin() function.
Again, I agree with Apurva, this is off course better done with template and CSS changes / configuration setting, but at least you got it to work!
/me applauds.
Stuff I do hack for is for our in office scenario :) And I am just happy to share the concept ideas here :) Shure, alteration could be made to find the site admin link but...
My first reference in this script is by an item ID, which processes usualy faster then finding an item without an ID in a site. So I used this thing, that suits our office scenario perfectly since we have only 1 site admin account :)
In my Cyn.in desktop it was rotated
and now it's gone?
The locking idea? Hmm... will think about it.