Automotivationals
How do I make an automotivationals?
Pulls a random image post from /r/EarthPorn and overlays a random thought from /r/Showerthoughts. What is a automotivationals? How do you make a automotivationals? This script and codes were developed by Boylett on 20 August 2022, Saturday.
Automotivationals - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Automotivationals</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Lato:300'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ html, body { width: 100%; height: 100%; overflow: hidden; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default;
}
body { background: #000 no-repeat center; background-size: cover;
}
h1 { position: absolute; top: 50%; right: 1em; left: 1em; margin: 0; padding: 0; overflow: visible; text-align: center; text-shadow: 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000; font-family: Lato, sans-serif; font-weight: 300; font-size: 4vw; line-height: 1.2em; color: #FFF; opacity: .9;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <h1></h1> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Automotivationals - Script Codes CSS Codes
html, body { width: 100%; height: 100%; overflow: hidden; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default;
}
body { background: #000 no-repeat center; background-size: cover;
}
h1 { position: absolute; top: 50%; right: 1em; left: 1em; margin: 0; padding: 0; overflow: visible; text-align: center; text-shadow: 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000, 0 0 1em #000; font-family: Lato, sans-serif; font-weight: 300; font-size: 4vw; line-height: 1.2em; color: #FFF; opacity: .9;
}
Automotivationals - Script Codes JS Codes
var load = function()
{ $.ajax( { url: 'https://www.reddit.com/r/EarthPorn.json', dataType: 'json', success: function(data) { var post = null; while(post == null || post.data.title.match(/earth ?porn/i) || post.data.title.match(/poll/i)) { post = data.data.children[Math.floor(Math.random() * data.data.children.length)]; } if(post.data.preview.images[0] && post.data.preview.images[0].source) { $('body').css('background-image', 'url(' + post.data.preview.images[0].source.url + ')'); } } }); $.ajax( { url: 'https://www.reddit.com/r/ShowerThoughts.json', dataType: 'json', success: function(data) { var post = null, title = $('h1'); while(post == null || post.data.title.match(/shower ?thoughts/i)) { post = data.data.children[Math.floor(Math.random() * data.data.children.length)]; } title.text(post.data.title.trim().replace(/\.$/, '')); $(window).trigger('resize'); } });
};
$(function()
{ load(); $('body').on('click', load); $(window).on('resize scroll', function() { var title = $('h1'); title.css( { 'margin': '-' + (title.height() / 2) + 'px 0 0' }); });
});
Developer | Boylett |
Username | boylett |
Uploaded | August 20, 2022 |
Rating | 4 |
Size | 3,149 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Animation Experiment | 2,218 Kb |
Quote App Concept by Matthew Bird | 4,937 Kb |
Form by Andrew Coyle | 2,920 Kb |
Particle Demo | 3,171 Kb |
Countdown by David Jones | 2,871 Kb |
Amusement Park Ticket | 2,032 Kb |
PixCrypt.js Website | 2,998 Kb |
Procreate File Viewer | 0 Kb |
HTML5 Drawing Studio | 46,525 Kb |
Commit Button by Andrew Coyle | 3,236 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Slides-07-1 POSITION | Exhtml | 1,909 Kb |
P5.js data visualization | Enginarslan | 2,233 Kb |
Border image | JohnRiordan | 2,120 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
Video mute | Leon9208 | 2,131 Kb |
Gradients | Karpovsystems | 2,394 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
A Pen by Michael Parenteau | Michaelparenteau | 2,133 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!