CINXE.COM
CBC Kids | Play Games, Watch Video, Explore
<!DOCTYPE html> <html lang="en"> <head> <meta property="fb:pages" content="234303596639900,564980490362398,185669354938012,980153248675210,9021636963,5823419603,630185150356988,82184406949,262275773829225,48363581912" /> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- metadata --> <title>CBC Kids | Play Games, Watch Video, Explore</title> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <!-- INCLUDES share_title = --> <meta name="description" content="Play free kids games, watch videos, and explore activities, quirky quizzes and fun facts. Watch Artzooka, Big Block Sing Song and more. " /> <!-- Twitter Card data --> <meta name="twitter:card" content="Play free kids games, watch videos, and explore activities, quirky quizzes and fun facts. Watch Artzooka, Big Block Sing Song and more. "> <meta name="twitter:site" content="@cbckids"> <meta name="twitter:title" content=""> <meta name="twitter:description" content="Play free kids games, watch videos, and explore activities, quirky quizzes and fun facts. Watch Artzooka, Big Block Sing Song and more. "> <meta name="twitter:creator" content="@cbckids"> <meta name="twitter:image" content="http://www.cbc.ca/kidscbc2/content/images/Kids2_LOGO.png"> <!-- Open Graph data --> <meta property="og:title" content="" /> <meta property="og:type" content="blog" /> <meta property="og:url" content="https://www.cbc.ca/kidscbc2/" /> <meta property="og:image" content="http://www.cbc.ca/kidscbc2/content/static-images/FB_Share_Kids2_v2.jpg" /> <meta property="og:description" content="Play free kids games, watch videos, and explore activities, quirky quizzes and fun facts. Watch Artzooka, Big Block Sing Song and more. " /> <meta property="og:site_name" content="CBC Kids" /> <meta property="article:section" content="CBC Kids" /> <meta property="article:author" content="https://www.facebook.com/cbckidsca" /> <meta property="article:publisher" content="https://www.facebook.com/cbckidsca" /> <style> @font-face { font-family: 'corporative'; src: url('/kidscbc2/content/fonts/corporative-soft-reg/corporativesoft-regular-webfont.woff2') format('woff2'), url('/kidscbc2/content/fonts/corporative-soft-reg/corporativesoft-regular-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } @font-face { font-family: 'jalebi'; src: url('/kidscbc2/content/fonts/jalebi/jalebi-webfont.woff2') format('woff2'), url('/kidscbc2/content/fonts/jalebi/jalebi-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } </style> <script> /* JSON object area */ </script> <!--end of metadata --> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="page-image" content=""> <!-- Google Fonts --> <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Bitter:400,400italic,700' rel='stylesheet' type='text/css'> <!-- Stylesheets --> <link rel="stylesheet" href="/kidscbc2/styles/013d82c6.vendor" /> <link rel="stylesheet" href="/kidscbc2/styles/2.0-version-sb" /> <link rel="stylesheet" href="/kidscbc2/styles/2.0-version-cd" /> <!-- JS Libraries --> <script src="/kidscbc2/scripts/modernizr"></script> <script src="//code.jquery.com/jquery-1.10.2.min.js"></script> <!-- breaks search <script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> --> <script src="/kidscbc2/scripts/jquery.mobile.min.custom"></script> <script src="/kidscbc2/scripts/lightbox"></script> <script src="/kidscbc2/scripts/ie_update"></script> <script src="/kidscbc2/scripts/bootstrap"></script> <script src="/kidscbc2/scripts/now_leaving"></script> <style> /* new games */ .games .icon { background-image: url(/kidscbc2/content/static-images/icons/games-nav.png); background-repeat: no-repeat; background-size: 42px; background-position: 5px 12px, center; } nav .games .icon { background-image: url(/kidscbc2/content/static-images/icons/games-nav-new.png) !important; background-repeat: no-repeat !important; background-position: 0 0 !important; background-size: cover !important; } </style> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <!--Copy and Paste Data Layer at bottom of head--> <!--Copy and Paste Data Layer at bottom of head <script> /* //DEFAULT var digitalData = digitalData || {}; digitalData = { producer: { applicationId: "1516.11111.143612" }, };*/ </script> Copy and Paste Data Layer at bottom of head--> <!-- PAGE SPECIFIC HEADER SCRIPTS --> <meta name="google-site-verification" content="pnfobTsrsw6QijbIuk5n1OqfDO3IV0gYVZi-d9PY0qM" /> <script src="/kidscbc2/scripts/content_slider"></script> <script> window.location = "https://www.cbc.ca/kids/"; $(function (){ /*console.log('doc ready, AJAX load sliders');*/ self = ContentSlider; $.ajax({ url: "/kidscbc2/partials/ajax-slider_content", success: function(data) { //console.log('==> ajax load success'); $('#slider_placement_container').html(data); ContentSlider.init(); }, error: function(data) { console.log('==> ajax load fail'); } }); console.log('build btn test LEGACY-KIDS-PROD: build and deployed through git/bamboo'); }); </script> </head> <body class=""> <script type="text/javascript" src="/g/stats/js/cbc-stats-top.js"></script> <a href="/kids" id="top_banner"> <div class="container"> <h1>CBC Kids | Play Games, Watch Video, Explore</h1> </div> </a> <nav class="navbar-default container main-nav" style="margin:0 auto;"> <div class="main-nav"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed menu" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="menu-label">Menu</span> </button> <div class="visible-xs col-xs-6 kids-search pull-right"> <!-- <form id="searchform" method="post" action="https://www.cbc.ca/kidscbc2/" > <div class='hiddenFields'> <input type="hidden" name="ACT" value="8" /> <input type="hidden" name="XID" value="ab5712147633b5dcbdb13f71b79bd60f0eaacf34" /> <input type="hidden" name="RES" value="500" /> <input type="hidden" name="meta" value="YTo5OntzOjY6InN0YXR1cyI7czoyMzoiT3BlbnxwdWJsaXNoZWR8ZmVhdHVyZWQiO3M6NzoiY2hhbm5lbCI7czoyNzoiZ2FtZXN8dGhlX2ZlZWR8c2hvd3N8dmlkZW9zIjtzOjg6ImNhdGVnb3J5IjtzOjExNDoiMXw2fDR8N3wzfDV8MnwzNnwxMDJ8NTV8NDl8NTB8NTF8NTJ8NTN8NTR8Mzd8MTd8MTh8MTl8Mzl8Mzh8MTZ8MTAxfDEwNHwxMDV8MTE2fDExN3wxMTF8MTEyfDExOHwxMTR8MTEwfDEwOXwxMTV8MTEzIjtzOjk6InNlYXJjaF9pbiI7czoxMDoiZXZlcnl3aGVyZSI7czo1OiJ3aGVyZSI7czozOiJhbnkiO3M6MTI6InNob3dfZXhwaXJlZCI7czowOiIiO3M6MTk6InNob3dfZnV0dXJlX2VudHJpZXMiO2I6MDtzOjExOiJyZXN1bHRfcGFnZSI7czo2OiJzZWFyY2giO3M6MTU6Im5vX3Jlc3VsdHNfcGFnZSI7czoxNjoic2VhcmNoL25vcmVzdWx0cyI7fWY4MTFlNTgzNGQzZTdlNWJkZTc5OTliZmYwZjA2OWFl" /> <input type="hidden" name="site_id" value="1" /> </div> <script type="text/javascript"> //<![CDATA[ var firstcategory = 1; var firststatus = 1; function changemenu(index) { var categories = new Array(); var i = firstcategory; var j = firststatus; var theSearchForm = false if (document.searchform) { theSearchForm = document.searchform; } else if (document.getElementById('searchform')) { theSearchForm = document.getElementById('searchform'); } if (theSearchForm.elements['channel_id']) { var channel_obj = theSearchForm.elements['channel_id']; } else { var channel_obj = theSearchForm.elements['channel_id[]']; } var channels = channel_obj.options[index].value; var reset = 0; for (var g = 0; g < channel_obj.options.length; g++) { if (channel_obj.options[g].value != 'null' && channel_obj.options[g].selected == true) { reset++; } } with (theSearchForm.elements['cat_id[]']) { if (channels == "3") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("Adventure Games", "116"); i++; categories[i] = new Option("Animal Games", "117"); i++; categories[i] = new Option("Festive Games", "111"); i++; categories[i] = new Option("Halloween Games", "112"); i++; categories[i] = new Option("Math & Word Games", "118"); i++; categories[i] = new Option("Puzzle Games", "114"); i++; categories[i] = new Option("Racing Games", "109"); i++; categories[i] = new Option("Retro Arcade Games", "110"); i++; categories[i] = new Option("Science Games", "115"); i++; categories[i] = new Option("Sports Games", "113"); i++; } // END if channels if (channels == "11") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("Extras", "55"); i++; categories[i] = new Option("No Seasons", "104"); i++; categories[i] = new Option("Season 1", "49"); i++; categories[i] = new Option("Season 2", "50"); i++; categories[i] = new Option("Season 3", "51"); i++; categories[i] = new Option("Season 4", "52"); i++; categories[i] = new Option("Season 5", "53"); i++; categories[i] = new Option("Season 6", "54"); i++; } // END if channels if (channels == "1") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("All Stuff", "1"); i++; categories[i] = new Option("Animals", "6"); i++; categories[i] = new Option("Canada", "36"); i++; categories[i] = new Option("Entertainment", "4"); i++; categories[i] = new Option("LOL", "7"); i++; categories[i] = new Option("Nature", "3"); i++; categories[i] = new Option("Science & Tech", "5"); i++; categories[i] = new Option("Sports", "102"); i++; categories[i] = new Option("World Events", "2"); i++; } // END if channels if (channels == "4") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("Extras", "55"); i++; categories[i] = new Option("No Seasons", "104"); i++; categories[i] = new Option("Season 1", "49"); i++; categories[i] = new Option("Season 2", "50"); i++; categories[i] = new Option("Season 3", "51"); i++; categories[i] = new Option("Season 4", "52"); i++; categories[i] = new Option("Season 5", "53"); i++; categories[i] = new Option("Season 6", "54"); i++; } // END if channels if (reset > 1) { categories = new Array(); } spaceString = eval("/!-!/g"); with (theSearchForm.elements['cat_id[]']) { for (i = length-1; i >= firstcategory; i--) options[i] = null; for (i = firstcategory; i < categories.length; i++) { options[i] = categories[i]; options[i].text = options[i].text.replace(spaceString, String.fromCharCode(160)); } options[0].selected = true; } } } //]]> </script> <label for="keywords">Search:</label> <input type="text" name="keywords" id="keywords" placeholder="Search site" value="" size="18" maxlength="100"> <input type="submit" value="submit" class="submit"> </form> --> </div> </div> <div class="collapse navbar-collapse" id="navbar-collapse"> <ul class="nav navbar-nav"> <li class="explore col-xs-12 col-sm-3 col-md-3"> <a href="https://www.cbc.ca/kidscbc2/explore" class="coloured-label "><span class="icon"></span>Explore</a> </li> <li class="videos col-xs-12 col-sm-3 col-md-3"> <a href="https://www.cbc.ca/kids/watch" class="coloured-label "><span class="icon"></span>Videos</a> </li> <li class="games col-xs-12 col-sm-3 col-md-3"> <a href="https://www.cbc.ca/kids/games" class="coloured-label "><span class="icon"></span>Games</a> </li> <li class="olympics col-xs-12 col-sm-3 col-md-3"> <a href="https://www.cbc.ca/kids/olympics/beijing2022" class="coloured-label active"><span>Beijing 2022</span></a> </li> <li class="col-xs-12 col-sm-3 col-md-3 kids-search hidden-xs"> <!-- <form id="searchform" method="post" action="https://www.cbc.ca/kidscbc2/" > <div class='hiddenFields'> <input type="hidden" name="ACT" value="8" /> <input type="hidden" name="XID" value="83efbaa9e16afe6fc324cc66caab7558c6d4d737" /> <input type="hidden" name="RES" value="500" /> <input type="hidden" name="meta" value="YTo5OntzOjY6InN0YXR1cyI7czoyMzoiT3BlbnxwdWJsaXNoZWR8ZmVhdHVyZWQiO3M6NzoiY2hhbm5lbCI7czoyNzoiZ2FtZXN8dGhlX2ZlZWR8c2hvd3N8dmlkZW9zIjtzOjg6ImNhdGVnb3J5IjtzOjExNDoiMXw2fDR8N3wzfDV8MnwzNnwxMDJ8NTV8NDl8NTB8NTF8NTJ8NTN8NTR8Mzd8MTd8MTh8MTl8Mzl8Mzh8MTZ8MTAxfDEwNHwxMDV8MTE2fDExN3wxMTF8MTEyfDExOHwxMTR8MTEwfDEwOXwxMTV8MTEzIjtzOjk6InNlYXJjaF9pbiI7czoxMDoiZXZlcnl3aGVyZSI7czo1OiJ3aGVyZSI7czozOiJhbnkiO3M6MTI6InNob3dfZXhwaXJlZCI7czowOiIiO3M6MTk6InNob3dfZnV0dXJlX2VudHJpZXMiO2I6MDtzOjExOiJyZXN1bHRfcGFnZSI7czo2OiJzZWFyY2giO3M6MTU6Im5vX3Jlc3VsdHNfcGFnZSI7czoxNjoic2VhcmNoL25vcmVzdWx0cyI7fWY4MTFlNTgzNGQzZTdlNWJkZTc5OTliZmYwZjA2OWFl" /> <input type="hidden" name="site_id" value="1" /> </div> <script type="text/javascript"> //<![CDATA[ var firstcategory = 1; var firststatus = 1; function changemenu(index) { var categories = new Array(); var i = firstcategory; var j = firststatus; var theSearchForm = false if (document.searchform) { theSearchForm = document.searchform; } else if (document.getElementById('searchform')) { theSearchForm = document.getElementById('searchform'); } if (theSearchForm.elements['channel_id']) { var channel_obj = theSearchForm.elements['channel_id']; } else { var channel_obj = theSearchForm.elements['channel_id[]']; } var channels = channel_obj.options[index].value; var reset = 0; for (var g = 0; g < channel_obj.options.length; g++) { if (channel_obj.options[g].value != 'null' && channel_obj.options[g].selected == true) { reset++; } } with (theSearchForm.elements['cat_id[]']) { if (channels == "3") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("Adventure Games", "116"); i++; categories[i] = new Option("Animal Games", "117"); i++; categories[i] = new Option("Festive Games", "111"); i++; categories[i] = new Option("Halloween Games", "112"); i++; categories[i] = new Option("Math & Word Games", "118"); i++; categories[i] = new Option("Puzzle Games", "114"); i++; categories[i] = new Option("Racing Games", "109"); i++; categories[i] = new Option("Retro Arcade Games", "110"); i++; categories[i] = new Option("Science Games", "115"); i++; categories[i] = new Option("Sports Games", "113"); i++; } // END if channels if (channels == "11") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("Extras", "55"); i++; categories[i] = new Option("No Seasons", "104"); i++; categories[i] = new Option("Season 1", "49"); i++; categories[i] = new Option("Season 2", "50"); i++; categories[i] = new Option("Season 3", "51"); i++; categories[i] = new Option("Season 4", "52"); i++; categories[i] = new Option("Season 5", "53"); i++; categories[i] = new Option("Season 6", "54"); i++; } // END if channels if (channels == "1") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("All Stuff", "1"); i++; categories[i] = new Option("Animals", "6"); i++; categories[i] = new Option("Canada", "36"); i++; categories[i] = new Option("Entertainment", "4"); i++; categories[i] = new Option("LOL", "7"); i++; categories[i] = new Option("Nature", "3"); i++; categories[i] = new Option("Science & Tech", "5"); i++; categories[i] = new Option("Sports", "102"); i++; categories[i] = new Option("World Events", "2"); i++; } // END if channels if (channels == "4") { categories[i] = new Option("-------", ""); i++; categories[i] = new Option("Extras", "55"); i++; categories[i] = new Option("No Seasons", "104"); i++; categories[i] = new Option("Season 1", "49"); i++; categories[i] = new Option("Season 2", "50"); i++; categories[i] = new Option("Season 3", "51"); i++; categories[i] = new Option("Season 4", "52"); i++; categories[i] = new Option("Season 5", "53"); i++; categories[i] = new Option("Season 6", "54"); i++; } // END if channels if (reset > 1) { categories = new Array(); } spaceString = eval("/!-!/g"); with (theSearchForm.elements['cat_id[]']) { for (i = length-1; i >= firstcategory; i--) options[i] = null; for (i = firstcategory; i < categories.length; i++) { options[i] = categories[i]; options[i].text = options[i].text.replace(spaceString, String.fromCharCode(160)); } options[0].selected = true; } } } //]]> </script> <label for="keywords">Search:</label> <input type="text" name="keywords" id="keywords" placeholder="Search site" value="" size="18" maxlength="100"> <input type="submit" value="submit" class="submit"> </form> --> </li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <div class="container page-home"> <main> <!-- the REAL feature widget --> <div class="row promo_row"> <div class="col-xs-12 col-sm-12 col-md-9 main" role="main"> <h2>Latest and Greatest</h2> <!-- explore entry --> <!-- 1:explore ||40:quiz-poll || --> <div class="explore quiz-poll tile col-xs-12 col-sm-8 col-md-8 left-tile lrg-tile"> <a class="tile_link" href="https://www.cbc.ca/kidscbc2/the-feed/how-well-do-you-know-dolphins-the-smartest-animals-of-the-sea"> <div class="image_wrap"> <img src="https://www.cbc.ca/kidscbc2/content/the_feed/dolphin_quiz_stub_header_update_1140.jpg" alt="" /> </div> <div class="caption_wrap"> <div class="icon"></div> <div class="coloured-label">Animal quiz</div> <div class="caption">How well do you know dolphins — the smartest animals of the sea?</div> </div> </a> </div> <!-- explore entry --> <!-- 1:explore ||6:animals ||44:article || --> <div class="explore article tile col-xs-12 col-sm-4 col-md-4 sm-tile"> <a class="tile_link" href="https://www.cbc.ca/kidscbc2/the-feed/weird-and-wonderful-bunnies"> <div class="image_wrap"> <img src="https://www.cbc.ca/kidscbc2/content/the_feed/weird_wonderful_bunnies_header_update_1140.jpg" alt="" /> </div> <div class="caption_wrap"> <div class="icon"></div> <div class="coloured-label">Fun Facts</div> <div class="caption">Weird and wonderful bunnies!</div> </div> </a> </div> <!-- explore entry --> <!-- 1:explore ||2:world-events ||36:canada ||44:article || --> <div class="explore article tile col-xs-12 col-sm-4 col-md-4 sm-tile"> <a class="tile_link" href="https://www.cbc.ca/kidscbc2/the-feed/how-passover-is-celebrated-around-the-world"> <div class="image_wrap"> <img src="https://www.cbc.ca/kidscbc2/content/the_feed/passover_header_update_1140.jpg" alt="" /> </div> <div class="caption_wrap"> <div class="icon"></div> <div class="coloured-label">Holidays 101</div> <div class="caption">Passover: celebrating the story of Exodus</div> </div> </a> </div> </div> <div class="col-xs-12 col-sm-12 col-md-3 main left-tile left-col"> <h3>More Cool Stuff</h3> <div class="col-xs-12 col-sm-6 col-md-12 left-tile promo-tile"> <a class="post" href="https://gem.cbc.ca/season/detention-adventure/season-2/5d19db2c-1026-490c-9c2a-dc7837ea5d0f" target="_blank"> <div class="module sm-module"> <img src="https://www.cbc.ca/kidscbc2/content/the_feed/KIDS_DAS2-Promo.png"/> </div> </a> </div> <div class="col-xs-12 col-sm-6 col-md-12 left-tile promo-tile"> <a class="post" href="https://gem.cbc.ca/season/the-adventures-of-paddington/season-1/79d01fce-d8a4-4e52-bebf-9dd3c3255916" target="_blank"> <div class="module sm-module"> <img src="https://www.cbc.ca/kidscbc2/content/frontpage_feature/KIDS_PADDINGTON-HomePromo.png"/> </div> </a> </div> </div> </div> <div id="slider_placement_container"> <img src="/kidscbc2/content/static-images/ajax-loading.gif" style="width: 50px; height: 50px; margin: 20px auto; display: block;"/> </div> </main> </div><!--end of container --> <div class="container footer-wrapper"> <div class="row primary-footer"> <div class="col-md-8 hidden-sm hidden-xs"> <a href="http://www.cbc.ca/parents/" target="_blank"><img src="/kidscbc2/content/static-images/label-parents.png" id="parents-logo" alt="CBC Parents logo"/></a>|<a href="http://www.cbc.ca/programguide/" target="_blank" id="tv-schedule"><img src="/kidscbc2/content/static-images/tv-schedule.png" id="tv-schedule" alt="TV Schedule"/></a> </div> <div class="col-xs-6 col-sm-9 visible-sm visible-xs"> <a href="http://www.cbc.ca/parents/" target="_blank">CBC Parents</a> <a href="http://www.cbc.ca/programguide/" target="_blank">TV Schedule</a> </div> <div class="col-xs-6 col-sm-3 col-md-3 pull-right"> <img src="/kidscbc2/content/static-images/CMF_logo.png" id="cmf-logo"/> </div> </div> <div class="row secondary-footer"> <div class="col-xs-12 col-sm-8 col-md-6"> <a href="https://cbc.radio-canada.ca/en/vision/governance/terms-of-use-digital-services" target="_blank">Terms of Use</a> <a href="https://www.cbc.ca/mycbc/cbc-and-your-data-1.5514726" target="_blank">Privacy</a> <a href="http://www.cbc.ca/aboutcbc/discover/copyright.html" target="_blank">Copyright</a> <a href="http://www.cbc.ca/aboutcbc/discover/policies.html" target="_blank">Other Policies</a> <a href="/kidscbc2/site/map">Sitemap</a> </div> <div class="col-xs-12 col-sm-4 col-md-4 pull-right copyright"> Copyright © CBC 2025 </div> </div> </div> <div id="cookies_popup_container"> </div> <!-- Parents cookies popup CSS --> <style> #cookies_popup_container{ width:100%; padding:1.2rem 0; position:fixed; bottom:0; z-index:949; display:flex; flex-wrap:wrap; justify-content:center; color: #FFF; } #cookies_popup_container .backing { background-color: #236bff; position: absolute; bottom: 0; height: 130px; display: block; z-index: -1; width: 100%; } #cookies_popup_container .noticeActions, #cookies_popup_container .noticeMessage{ /* margin:.2rem .5rem; */ display: inline-flex; } #cookies_popup_container .noticeMessage{ max-width:40rem; /* width: 70%; */ } #cookies_popup_container .noticeMessage a{ text-decoration: underline; color: #CCFF33 !important; } #cookies_popup_container .noticeActions{ font-weight:700; max-width:20rem; /* width: 30%; */ display:inline-flex; justify-content:center } .privacyNotification .noticeActions .noticeButton { background: transparent url(/kidscbc2/content/static-images/btn-cookie.png) left top no-repeat; border: none; width: 137px; height: 142px; text-indent: -9999px; overflow: hidden; } .privacyNotification .noticeActions .noticeButton:hover, .privacyNotification .noticeActions .noticeButton:focus { background: transparent url(/kidscbc2/content/static-images/btn-cookie-hover.png) left top no-repeat; } @media (max-width: 768px) { #cookies_popup_container { background-color: #236bff; } .privacyNotification { left: 5%; top: 10%; bottom: unset; width: 90%; text-align: center; } #cookies_popup_container .backing { display: none; } } </style> <!-- Kids cookies popup CSS hacks --> <style> /* #cookies_popup_container { background-color: rgba(0,0,0,.6); width: 100%; height: 100%; left: 0; top: 0; bottom: 0; position: fixed; display: none; } .privacyNotification{ font-family: "Quicksand-Bold", "Arial", serif; font-size: 26px; color: #FFFFFF; text-align: center; line-height: 28px; padding: 1.2rem 2em; margin: 0 auto; left: 25%; top: 25%; bottom: 25%; width: 50%; height: 50%; border: 3px solid #aaa; border-radius: 25px; } .privacyNotification .noticeMessage { max-width: unset; } */ </style> <script> const ROLLOUT_THRESHOLDS = [{ value: 0, activeDate: new Date("Sep 24 2018 11:00:00 GMT-0400").valueOf() }, { value: 0.25, activeDate: new Date("Oct 31 2018 10:00:00 GMT-0400").valueOf() }, { value: 0.50, activeDate: new Date("Oct 31 2018 11:00:00 GMT-0400").valueOf() }, { value: 0.75, activeDate: new Date("Oct 31 2018 12:00:00 GMT-0400").valueOf() }, { value: 1.00, activeDate: new Date("Oct 31 2018 13:00:00 GMT-0400").valueOf() }]; const PRIVACY_NOTIFICATION_COOKIE_NAME = "cbc_kids_privacy_notification"; const YOUR_DATA_AND_PRIVACY_LINK = ""; const POPUP_HTML_TARGET = "#cookies_popup_container"; const COOKIE_CONFIG = {'domain':'.cbc.ca'}; const ALERT_BODY = ` <div class="privacyNotification" id="privacyNotification" > <div class="noticeMessage"> <p>CBC Kids uses cookies in order to function and give you a great experience. Your parent or guardian can <a href="https://www.cbc.ca/mycbc/cookies/manage">disable the cookies by clicking here</a> if they wish.</p> </div> <div class="noticeActions"> <button class="noticeButton" aria-label="dismiss notification"> Close </button> </div> </div> <div class="backing"></div> `; const DEBUG_MODE = true; const trace = (msg) => {if( DEBUG_MODE )console.log(msg)} var showPopup = false; // ocelot/pod/client-web/dynamic/app/utils/cookies/library.js function createFeedCookie(name, value, days) {trace(`createFeedCookie(${name}, ${value}, ${days})`); if(typeof window === "undefined") {return;} // Set the expiration date to 1000 days, unless specified otherwise const dayInSeconds = 86400000; const defaultExpiryDays = 1000; const expiration = ( days ? days : defaultExpiryDays ) * dayInSeconds; let date = new Date(); date.setTime(date.getTime() + expiration); const expires = `; expires=${date.toUTCString()}`; // Set the cookie window.document.cookie = `${name}=${value}${expires}; path=/; domain=${COOKIE_CONFIG.domain}`; trace('set the cookie!') trace(window.document.cookie) return; } function getFeedCookie(name) {trace(`getFeedCookie(${name})`); if(typeof window === "undefined") {return;} const cookies = window.document.cookie.split(";"); let requestedCookie = null; cookies.forEach( (cookie) => { const cookieValues = cookie.split("="); if(cookieValues[0] && cookieValues[0].trim() === name) { trace('found cookie with needed prop'); requestedCookie = { name: cookieValues[0], value: cookieValues[1] }; } }); return requestedCookie; } function setFeedCookie(name, value) {trace(`setFeedCookie(${name}, ${value})`); if(typeof window === "undefined") {return;} const cookieExists = getFeedCookie(name); if(cookieExists) { //Delete the cookie if it exists, by setting the expiration date in the past document.cookie = `${cookieExists.name} +'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;`; } //Create the cookie with a new value createFeedCookie(name, value, 30); } // ocelot/pod/client-web/dynamic/app/components/PrivacyNotification/library/dateNow.js const getDateNow = () => { return Date.now(); }; // ocelot/pod/client-web/dynamic/app/components/PrivacyNotification/library/generateRolloutRank.js const generateRolloutRank = () => { return Math.random(); }; // ocelot/pod/client-web/dynamic/app/components/PrivacyNotification/component.js function shouldNotificationExecute() { trace('shouldNotificationExecute()') let cookie = getFeedCookie(PRIVACY_NOTIFICATION_COOKIE_NAME); if (! cookie) { trace('no cookie found, create one'); setFeedCookie( PRIVACY_NOTIFICATION_COOKIE_NAME, generateRolloutRank() ); cookie = getFeedCookie(PRIVACY_NOTIFICATION_COOKIE_NAME); const isCookiesSupported = (cookie != null); if (! isCookiesSupported) { trace(`SHOULD NOT SHOW POPUP, NOT SUPPORTED. ${cookie}`); return false; } } let cookieValue = +cookie.value; if (cookieValue === 1) { // The notification has already been executed for the client. trace('SHOULD NOT SHOW COOKIE, already shown'); return false; } let now = getDateNow(); let validThresholds = ROLLOUT_THRESHOLDS.filter(threshold => { trace(`THRESHOLD HIT POPUP CONDITION ${(now >= threshold.activeDate)}`); return (now >= threshold.activeDate); }); if (validThresholds.length === 0) { trace('DO NOT SHOW POPUP, NO TRESHOLDS'); return false; } let activeThreshold = validThresholds.sort((a, b) => { return (b.activeDate - a.activeDate); })[0]; if (cookieValue < activeThreshold.value) { trace('SOME MORE THRESHOLD STUFF, SHOW POPUP'); setFeedCookie(PRIVACY_NOTIFICATION_COOKIE_NAME, 1); return true; } trace('FINALLY, DO NOT SHOW POPUP'); return false; } var cookie_close, cookie_close_hover; $(document).ready(() => { trace(`DOC READY :: cookie popup PRIVACY_NOTIFICATION_COOKIE_NAME: ${PRIVACY_NOTIFICATION_COOKIE_NAME}`); cookie_close = new Image(); cookie_close.src = "/kidscbc2/content/static-images/btn-cookie.png" cookie_close_hover = new Image(); cookie_close_hover.src = '/kidscbc2/content/static-images/btn-cookie-hover.png'; showPopup = shouldNotificationExecute(); //showPopup = true; /// always show popup trace(` showPopup: ${showPopup}`); if (showPopup) { trace(`SHOW POPUP :: cookie popup cookies_popup_container: ${$('#cookies_popup_container')} `); $(POPUP_HTML_TARGET).html(ALERT_BODY); $(POPUP_HTML_TARGET).attr('role','alert') $(POPUP_HTML_TARGET).show(); $('.noticeButton').click(e => { trace('HIDE POPUP :: cookie popup'); $(POPUP_HTML_TARGET).hide(); }) } else { trace('HIDE POPUP :: cookie popup'); $(POPUP_HTML_TARGET).html(''); $(POPUP_HTML_TARGET).hide(); } }) </script> <!-- PAGE SPECIFIC FOOTER SCRIPTS --> </body> </html>