• 7heo
    link
    fedilink
    arrow-up
    25
    arrow-down
    1
    ·
    9 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);