Quote:
Originally Posted by Argh
[You must be logged in to view images. Log in or Register.]
I have to imagine you are jut trying to troll me Baler.
An example would be this:
Quote:
function isUserLoggedIn () {
var loginState = document.getElementById('pt-logout') ? true : false;
return loginState;
}
|
The function returns a true/false value depending on if you are logged into the wiki, by checking if the 'logout' button in the header is present.
|
It hurts my soul just a litle to see a ternary used with true/false like that (FYI you could just do
!!document.getElementById('pt-logout') if you really want a boolean, or just leave off the !! and it will still be a "tuthy" value in terms of how JS treats non-booleans as booleans) ... but that's still an excellent example
[You must be logged in to view images. Log in or Register.]
But again, the key thing is that we're talking about hiding part of the UI, on your computer, by looking at another part of the UI, again on your computer. No tracking.