Skip to content

Instantly share code, notes, and snippets.

View LensPlaysGames's full-sized avatar

Lens LensPlaysGames

View GitHub Profile
@LensPlaysGames
LensPlaysGames / subreddits.js
Last active August 2, 2021 19:27 — forked from pixelbart/subreddits.js
Show an random image from a subreddit
// Place in your body:
// <div id="randomimg"></div>
$(function () {
GetRandRedditImage("Pics");
function GetRandRedditImage(subreddit) {
var imgcontainer = $("#randomimg");
var aRandomNum = Math.floor((Math.random() * 25) + 1);