mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-01 18:31:24 +01:00
settings label
This commit is contained in:
1 parent
39b9f1349d
commit
1fc81b445f
3 files changed
+104
-94
No files matched your search
+78
-61
@@ -1,99 +1,116 @@
|
|||||||
/* Variables */
|
/* Variables */
|
||||||
:root {
|
:root {
|
||||||
--primary: #CC2929;
|
--primary: #cc2929;
|
||||||
--accent: #581111;
|
--accent: #581111;
|
||||||
|
|
||||||
--background: #111;
|
--background: #111;
|
||||||
--secondary: #272727;
|
--secondary: #272727;
|
||||||
--lightGrey: #999;
|
--tertiary: #333333;
|
||||||
--white: #fff;
|
--lightGrey: #999;
|
||||||
|
--white: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Window Styling */
|
/* Window Styling */
|
||||||
html,body {
|
html,
|
||||||
background-color: var(--background);
|
body {
|
||||||
color: var(--white);
|
background-color: var(--background);
|
||||||
min-width: 300px;
|
color: var(--white);
|
||||||
padding: 0.5em;
|
min-width: 300px;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
padding: 0.5em;
|
||||||
font-size: 14px;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
color: var(--white);
|
color: var(--white);
|
||||||
background: var(--secondary);
|
background: var(--secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 5px 16px;
|
padding: 5px 16px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%);
|
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%),
|
||||||
|
0 1px 10px 0 rgb(0 0 0 / 12%);
|
||||||
}
|
}
|
||||||
|
|
||||||
#advancedToggle {
|
#advancedToggle {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#advancedSettings {
|
#advancedSettings {
|
||||||
display: none;
|
display: none;
|
||||||
border: 2px solid var(--secondary);
|
color: var(--tertiary);
|
||||||
border-radius: 4px;
|
border: 2px solid var(--secondary);
|
||||||
padding: 0.5em;
|
border-radius: 1rem;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#andvancedLegend {
|
||||||
|
color: var(--tertiary) !important;
|
||||||
|
/* margin: auto; */ /* Center the label */
|
||||||
|
/* padding: .25rem .5rem; */
|
||||||
|
/* border-radius: .25rem; */
|
||||||
|
/* border: .25rem solid var(--secondary); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Switches */
|
/* Switches */
|
||||||
.switch {
|
.switch {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 17px;
|
height: 17px;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch:last-of-time {
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch input {
|
.switch input {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider {
|
.slider {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: var(--secondary);
|
background: var(--secondary);
|
||||||
transition: .4s;
|
transition: 0.4s;
|
||||||
border-radius: 34px;
|
border-radius: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider:before {
|
.slider:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: "";
|
||||||
height: 13px;
|
height: 13px;
|
||||||
width: 13px;
|
width: 13px;
|
||||||
left: 2px;
|
left: 2px;
|
||||||
bottom: 2px;
|
bottom: 2px;
|
||||||
background: var(--lightGrey);
|
background: var(--lightGrey);
|
||||||
transition: .4s;
|
transition: 0.4s;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked+.slider {
|
input:checked + .slider {
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked+.slider:before {
|
input:checked + .slider:before {
|
||||||
transform: translateX(13px);
|
transform: translateX(13px);
|
||||||
background: var(--primary);
|
background: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.switchLabel {
|
.switchLabel {
|
||||||
width: 250px !important;
|
margin-left: 0.5rem;
|
||||||
transform: translateX(35px);
|
width: 250px !important;
|
||||||
display: inline-block;
|
transform: translateX(35px);
|
||||||
}
|
display: inline-block;
|
||||||
|
}
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=utf-8">
|
<meta content="text/html; charset=utf-8" />
|
||||||
<title>Return YouTube Dislike</title>
|
<title>Return YouTube Dislike</title>
|
||||||
<link rel="stylesheet" href="popup.css">
|
<link rel="stylesheet" href="popup.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<img src="icons/icon48.png" alt="Logo" />
|
<img src="icons/icon48.png" alt="Logo" />
|
||||||
<h1>Return YouTube Dislike</h1>
|
<h1>Return YouTube Dislike</h1>
|
||||||
@@ -17,28 +15,25 @@
|
|||||||
<button id="link_github">GitHub</button>
|
<button id="link_github">GitHub</button>
|
||||||
<button id="link_discord">Discord</button>
|
<button id="link_discord">Discord</button>
|
||||||
|
|
||||||
<br>
|
<br />
|
||||||
<button id="advancedToggle">Show Settings</button>
|
<button id="advancedToggle">Show Settings</button>
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<div id="advancedSettings">
|
<fieldset id="advancedSettings">
|
||||||
|
<legend id="advancedLegend">Settings</legend>
|
||||||
|
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input type="checkbox" id="disable_ratio_bar" />
|
<input type="checkbox" id="disable_ratio_bar" />
|
||||||
<span class="slider" />
|
<span class="slider" />
|
||||||
<span class="switchLabel">Lorem ipsum dolor sit amet</span>
|
<span class="switchLabel">Lorem ipsum dolor sit amet</span> </label
|
||||||
</label><br>
|
><br />
|
||||||
|
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input type="checkbox" id="disable_api_unlisted" />
|
<input type="checkbox" id="disable_api_unlisted" />
|
||||||
<span class="slider" />
|
<span class="slider" />
|
||||||
<span class="switchLabel">Lorem ipsum dolor sit amet</span>
|
<span class="switchLabel">Lorem ipsum dolor sit amet</span> </label
|
||||||
</label><br>
|
><br />
|
||||||
|
</fieldset>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script src="popup.js"></script>
|
<script src="popup.js"></script>
|
||||||
</html>
|
</html>
|
||||||
+12
-14
@@ -5,29 +5,29 @@ const config = {
|
|||||||
hideAdvancedMessage: "Hide Settings",
|
hideAdvancedMessage: "Hide Settings",
|
||||||
|
|
||||||
links: {
|
links: {
|
||||||
website: 'https://returnyoutubedislike.com',
|
website: "https://returnyoutubedislike.com",
|
||||||
github: 'https://github.com/Anarios/return-youtube-dislike',
|
github: "https://github.com/Anarios/return-youtube-dislike",
|
||||||
discord: 'https://discord.gg/mYnESY4Md5'
|
discord: "https://discord.gg/mYnESY4Md5",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Links */
|
/* Links */
|
||||||
document.getElementById('link_website').addEventListener('click', () => {
|
document.getElementById("link_website").addEventListener("click", () => {
|
||||||
chrome.tabs.create({url: config.links.website});
|
chrome.tabs.create({ url: config.links.website });
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('link_github').addEventListener('click', () => {
|
document.getElementById("link_github").addEventListener("click", () => {
|
||||||
chrome.tabs.create({url: config.links.github});
|
chrome.tabs.create({ url: config.links.github });
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('link_discord').addEventListener('click', () => {
|
document.getElementById("link_discord").addEventListener("click", () => {
|
||||||
chrome.tabs.create({url: config.links.discord});
|
chrome.tabs.create({ url: config.links.discord });
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Advanced Toggle */
|
/* Advanced Toggle */
|
||||||
const advancedToggle = document.getElementById('advancedToggle');
|
const advancedToggle = document.getElementById("advancedToggle");
|
||||||
advancedToggle.addEventListener('click', () => {
|
advancedToggle.addEventListener("click", () => {
|
||||||
const adv = document.getElementById('advancedSettings');
|
const adv = document.getElementById("advancedSettings");
|
||||||
if (config.advanced) {
|
if (config.advanced) {
|
||||||
adv.style.display = "none";
|
adv.style.display = "none";
|
||||||
advancedToggle.innerHTML = config.showAdvancedMessage;
|
advancedToggle.innerHTML = config.showAdvancedMessage;
|
||||||
@@ -39,8 +39,6 @@ advancedToggle.addEventListener('click', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* popup-script.js
|
/* popup-script.js
|
||||||
document.querySelector('#login')
|
document.querySelector('#login')
|
||||||
.addEventListener('click', function () {
|
.addEventListener('click', function () {
|
||||||
|
|||||||
Reference in new issue
Block a user