Sanity check.
It works with literally no features.
This commit is contained in:
commit
712f350fe7
4 changed files with 115 additions and 0 deletions
12
content.js
Normal file
12
content.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Create the button
|
||||
const button = document.createElement('button');
|
||||
button.id = 'fumbleButton';
|
||||
button.textContent = 'Fumble!';
|
||||
|
||||
// Add click handler
|
||||
button.addEventListener('click', () => {
|
||||
window.location.href = 'https://wiby.me/surprise/';
|
||||
});
|
||||
|
||||
// Add button to page
|
||||
document.body.appendChild(button);
|
26
index.html
Normal file
26
index.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FumbleUpon</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="logo">FumbleUpon</div>
|
||||
<button id="fumbleButton">Fumble!</button>
|
||||
</header>
|
||||
<main>
|
||||
<iframe id="contentFrame" src="about:blank" title="Content"></iframe>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
document.getElementById('fumbleButton').addEventListener('click', async () => {
|
||||
const frame = document.getElementById('contentFrame');
|
||||
// Open wiby.me/surprise directly in the iframe
|
||||
frame.src = 'https://wiby.me/surprise/';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
14
manifest.json
Normal file
14
manifest.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "FumbleUpon",
|
||||
"version": "1.0",
|
||||
"description": "Discover random websites, just like StumbleUpon used to do!",
|
||||
"permissions": [],
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["<all_urls>"],
|
||||
"css": ["styles.css"],
|
||||
"js": ["content.js"]
|
||||
}
|
||||
]
|
||||
}
|
63
styles.css
Normal file
63
styles.css
Normal file
|
@ -0,0 +1,63 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #ff4500;
|
||||
}
|
||||
|
||||
#fumbleButton {
|
||||
padding: 10px 25px;
|
||||
background-color: #ff4500;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s, background-color 0.2s;
|
||||
}
|
||||
|
||||
#fumbleButton:hover {
|
||||
background-color: #ff5722;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
#fumbleButton:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#contentFrame {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
Loading…
Reference in a new issue