Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mrunal736 authored Feb 5, 2022
1 parent 61d25e0 commit 45a2018
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
Binary file added Random Jokes Extension/backgroundimg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Random Jokes Extension/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions Random Jokes Extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name" : "JOKES",
"version" : "0.0.1",
"manifest_version": 2,
"browser_action": {
"default_popup": "popup.html",
"default_icon": "logo.png"
},
"icons": {
"128": "logo.png"
},
"permissions": ["activeTab"]

}
14 changes: 14 additions & 0 deletions Random Jokes Extension/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta nane="viewport" content="width=devicewidth, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>JOKES :)</title>
</head>
<body>
<p id = "jokeElement">Loading....Funny JOkEs :)</p>
<script src="script.js"></script>
</body>
</html>
8 changes: 8 additions & 0 deletions Random Jokes Extension/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fetch('https://icanhazdadjoke.com/slack')
.then(data => data.json())
.then(jokeData => {
const jokeText = jokeData.attachments[0].text;
const jokeElement = document.getElementById('jokeElement');

jokeElement.innerHTML = jokeText;
})
19 changes: 19 additions & 0 deletions Random Jokes Extension/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
body {
width: 400px;
height: 200px;
background-image: url("backgroundimg.jpg");
background-color: aliceblue;
display: flex;
justify-content: center;
border: 5px solid rgb(7, 74, 78);
}
p {
display: inner-flex;
margin:auto 10px;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
font-size: 25px;
color: rgb(7, 39, 41);
padding: 10px;
font-weight: bold;

}

0 comments on commit 45a2018

Please sign in to comment.