Skip to content

Commit

Permalink
Tamper Monkey Extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sreevidya-16 authored Aug 8, 2024
1 parent be3078e commit dd56ed6
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 0 deletions.
26 changes: 26 additions & 0 deletions TamperMonkey/index.html
Original file line number Diff line number Diff line change
@@ -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>Advanced CSS with Gradient Background</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="custom-banner">Welcome to the Styled Page!</div>

<section class="custom-section">
<h1>Sample Section</h1>
<p>This is a section with advanced CSS styling and gradient background.</p>
<a href="#">Sample Link</a>
<button>Click Me</button>
</section>

<section class="custom-section">
<h1>Another Section</h1>
<p>This is another section with advanced CSS styling and gradient background.</p>
</section>

<script src="script.js"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions TamperMonkey/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"manifest_version": 3,
"name": "Tamper Monkey Extension",
"version": "1.0",
"description": "Apply custom CSS with advanced styling and gradient background to webpages.",
"icons": {
"48": "icons/icon48.png",
"128": "icons/icon128.png"
},
"content_scripts": [
{
"matches": ["https://example.com/*"],
"css": ["style.css"],
"js": ["script.js"]
}
],
"permissions": [
"activeTab",
"scripting"
]
}
25 changes: 25 additions & 0 deletions TamperMonkey/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ==UserScript==
// @name Advanced CSS Styling with Gradient
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Apply custom CSS with advanced styling and gradient background
// @author Your Name
// @match https://example.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @resource CUSTOM_CSS https://yourdomain.com/style.css
// ==/UserScript==

(function() {
'use strict';

// Inject custom CSS
const cssLink = document.createElement("link");
cssLink.href = GM_getResourceURL("CUSTOM_CSS");
cssLink.rel = "stylesheet";
cssLink.type = "text/css";
document.head.appendChild(cssLink);

// Example of adding custom elements or modifying the page
$('body').prepend('<div class="custom-banner">Welcome to the Styled Page!</div>');
})();
51 changes: 51 additions & 0 deletions TamperMonkey/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Advanced CSS with Gradient Background */

body {
background: linear-gradient(45deg, #ff7e5f, #feb47b);
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #333;
}

.custom-banner {
background: rgba(255, 255, 255, 0.8);
color: #333;
padding: 20px;
text-align: center;
font-size: 24px;
font-weight: bold;
margin-bottom: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

a {
color: #ff7e5f;
text-decoration: none;
transition: color 0.3s ease;
}

a:hover {
color: #feb47b;
}

button {
background: #ff7e5f;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s ease;
}

button:hover {
background: #feb47b;
}

.custom-section {
padding: 40px;
background: #fff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}

0 comments on commit dd56ed6

Please sign in to comment.