• 7heo@lemmy.ml
    link
    fedilink
    arrow-up
    27
    arrow-down
    1
    ·
    8 months ago

    That isn’t real. It wouldn’t pass peer review. Here is the actual code:

    function GetCookieValue(x) {
      return JSON.stringify(x);
    }
    
    user.cookies.agreed = Boolean(GetCookieValue(true));
    
    if(!DarkPatternPopup()) {
      // Make sure we respect the user choice
      user.cookies.agreed = Boolean(GetCookieValue(false));
    }
    
    if(user.cookies.agreed) CollectData(user);