View Single Post
  #20  
Old 06-26-2020, 09:25 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,343
Default

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.
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Last edited by loramin; 06-26-2020 at 09:29 PM..