<html>
<head>
<style>
.tab{background: grey}
.bar{color: white}
</style>
</head>
<body>
<span class="tab" id="inbox">in</span>
<span class="tab" id="outbox">out</span>
<script>
c=document.querySelectorAll("span.tab")
if(/\?\w{4}1$/.test(location)){
for(var i=0; i<c.length; i++) if(c[i].id==="inbox") c[i].className+=" bar"
}
if(/\?\w{4}2$/.test(location)){
for(var i=0; i<c.length; i++) if(c[i].id==="outbox") c[i].className+=" bar"
}
</script>
</body>
</html>