Calculator Tools Calculator Tools
Create

Baby Shark & MrBeast

Jan 2, 2024

About this app

Experience the world's most famous video and YouTuber in one place.

Baby Shark & MrBeast Baby Shark & MrBeast Experience the world's most famous video and YouTuber in one place.

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Baby Shark & MrBeast</title>
<meta name="description" content="Experience the world's most famous video and YouTuber in one place.">
<meta name="keywords" content="baby shark, mrbeast, youtube, video">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Poppins:400,700" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Fetch Baby Shark video from YouTube API
$.ajax({
url: "https://www.googleapis.com/youtube/v3/search",
type: "GET",
data: {
part: "snippet",
q: "Baby Shark",
maxResults: 1,
key: "YOUR_YOUTUBE_API_KEY"
},
success: function(response) {
if (response.items.length > 0) {
var videoId = response.items[0].id.videoId;
var videoUrl = "https://www.youtube.com/watch?v=" + videoId;

// Display Baby Shark video
var babySharkVideo = '<div class="video-container">' +
'<iframe src="' + videoUrl + '" frameborder="0" allowfullscreen></iframe>' +
'</div>';
$("#baby-shark-video").html(babySharkVideo);
}
},
error: function(error) {
console.log(error);
}
});

// Fetch MrBeast's YouTube channel information from YouTube API
$.ajax({
url: "https://www.googleapis.com/youtube/v3/channels",
type: "GET",
data: {
part: "snippet",
forUsername: "MrBeast",
key: "YOUR_YOUTUBE_API_KEY"
},
success: function(response) {
if (response.items.length > 0) {
var channel = response.items[0].snippet;

// Display MrBeast's channel information
var mrBeastChannel = '<div class="channel-container">' +
'<img src="' + channel.thumbnails.medium.url + '" alt="MrBeast">' +
'<h2>' + channel.title + '</h2>' +
'<p>' + channel.description + '</p>' +
'</div>';
$("#mrbeast-channel").html(mrBeastChannel);
}
},
error: function(error) {
console.log(error);
}
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
body {
font-family: 'Poppins', sans-serif;
background-color: #f7f7f7;
}

.container {
max-width: 900px;
margin: 0 auto;
padding: 40px 20px;
text-align: center;
}

h1 {
font-size: 36px;
font-weight: 700;
margin-bottom: 20px;
}

p {
font-size: 18px;
margin-bottom: 20px;
}

.video-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
}

.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.channel-container {
margin-top: 40px;
display: flex;
flex-direction: column;
align-items: center;
}

.channel-container img {
width: 200px;
height: 200px;
border-radius: 50%;
margin-bottom: 20px;
}

.channel-container h2 {
font-size: 24px;
font-weight: 700;
margin-bottom: 10px;
}

.channel-container p {
font-size: 16px;
line-height: 1.5;
color: #888;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Baby Shark & MrBeast</h1>

<div id="baby-shark-video"></div>

<p>Experience the world's most famous video and YouTuber in one place.</p>

<div id="mrbeast-channel"></div>
</div>
</body>
</html>