Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random Quote creater(RaNa)-Chrome Extension #103

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Random Quote creater(RaNa)-Chrome Extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Random jokes generator-chrome extension(RaNa)

# Installation Steps follwing this steps corectly...............................>


Clone this repo --------------------------------------------------->1.

Open chrome browser and select Extensions menu ------------------------>2.

Enable developer mode and select load unpacked option -------------------->3.

Select cloned folder.-------------------------------------------------------->4.



THANK YOU!!!!!!!!!!!
Binary file not shown.
24 changes: 24 additions & 0 deletions Random Quote creater(RaNa)-Chrome Extension/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">

<title>Random Quote creater(RaNa)</title>


</head>

<body>
<div
class="container";>
<div class="quotebox"><p id="quote">Please wait...</p>
</div>
<button id="btn">More!</button>
</div>
<script src="script.js"></script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions Random Quote creater(RaNa)-Chrome Extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "fun time",
"version": "1.0.0",
"manifest_version": 2,
"browser_action":

{
"default_popup": "index.html",
"default_icon": "logo.png"
},
"icons":
{
"128": "logo.png"
},
"permissions": ["activeTab"]
}
22 changes: 22 additions & 0 deletions Random Quote creater(RaNa)-Chrome Extension/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const quote = document.querySelector
("#quote");
const btn = document.querySelector
("#btn");

btn.addEventListener("click", getQuote);

function getQuote()

{
fetch("https://icanhazdadjoke.com/slack")
.then(res => res.json())
.then(data => {
const joke = data.attachments[0].text;
quote.innerHTML=joke;



})
}
getQuote();

53 changes: 53 additions & 0 deletions Random Quote creater(RaNa)-Chrome Extension/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

body {
width: 500px;
height: 500px;
background-color:rgb(32, 63, 201);
display: flex;
justify-content: center;
font-family: helvetica;
font-size: 18px;
}

.container {
margin: 200px auto;
width: 400px;
display: flex;
flex-direction: column;
}

.quote-box {
border: none;
padding: 30px 20px;
margin-bottom: 20px;
}
#quote {
color: rgb(170, 167, 167);
text-align: center;
}
#author {
float: right;
color: rgb(170, 167, 167);
font-weight: bold;
font-style: italic;
margin-top: 10px;
}

#btn {
align-self: center;
position: fixed;
margin-top:170px;
border-radius: 8px;
padding: 10px 15px;
color: rgb(161, 148, 148);
font-weight: bold;
opacity: 0.6;
display:inline-block;
cursor: pointer;
transition: 0.3s;

}

#btn:hover {
opacity: 1;
}