mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-02 19:01:21 +01:00
added version debugger and toggle hover explainer
This commit is contained in:
1 parent
af661431f8
commit
7c9a80a629
3 files changed
+56
-4
No files matched your search
@@ -43,14 +43,50 @@ button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ext-version {
|
#ext-version {
|
||||||
|
padding: .25rem .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ext-update {
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--white);
|
||||||
|
text-decoration: none;
|
||||||
|
background: var(--primary);
|
||||||
|
border-radius: .25rem;
|
||||||
|
}
|
||||||
|
#ext-update:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ext {
|
||||||
|
padding: .25rem 0;
|
||||||
z-index: 69;
|
z-index: 69;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
background: var(--secondary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
bottom: 1.15rem;
|
bottom: 1.15rem;
|
||||||
right: 1.15rem;
|
right: 1.15rem;
|
||||||
background: var(--secondary);
|
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch::before {
|
||||||
|
content: attr(data-hover);
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
width: 250px;
|
||||||
|
background-color: var(--secondary);
|
||||||
|
border-radius: .5rem;
|
||||||
padding: .25rem .5rem;
|
padding: .25rem .5rem;
|
||||||
|
transition: opacity .2 ease-in-out;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
left: 0;
|
||||||
|
top: 160%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch:hover::before {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
#advancedToggle {
|
#advancedToggle {
|
||||||
|
|||||||
@@ -65,16 +65,19 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- bottom-right -->
|
<!-- bottom-right -->
|
||||||
<p id="ext-version"></p>
|
<div id="ext">
|
||||||
|
<a href="https://returnyoutubedislike.com/install" target="_blank" id="ext-update"></a>
|
||||||
|
<span id="ext-version"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- dialog box -->
|
<!-- dialog box -->
|
||||||
<fieldset id="advancedSettings">
|
<fieldset id="advancedSettings">
|
||||||
<legend id="advancedLegend">Settings</legend>
|
<legend id="advancedLegend">Settings</legend>
|
||||||
|
|
||||||
<label class="switch">
|
<label class="switch" data-hover="Stops counting your likes and dislikes.">
|
||||||
<input type="checkbox" id="disable_vote_submission" />
|
<input type="checkbox" id="disable_vote_submission" />
|
||||||
<span class="slider" />
|
<span class="slider" />
|
||||||
<span class="switchLabel">Disable like/dislike submission</span>
|
<span class="switchLabel">Disable vote submission</span>
|
||||||
</label>
|
</label>
|
||||||
<!-- <br />
|
<!-- <br />
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
|
|||||||
@@ -71,6 +71,19 @@ function initConfig() {
|
|||||||
function initializeVersionNumber() {
|
function initializeVersionNumber() {
|
||||||
const version = chrome.runtime.getManifest().version;
|
const version = chrome.runtime.getManifest().version;
|
||||||
document.getElementById('ext-version').innerHTML = 'v' + version;
|
document.getElementById('ext-version').innerHTML = 'v' + version;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json"
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((json) => {
|
||||||
|
if (version !== json.version) {
|
||||||
|
document.getElementById('ext-update').innerHTML = 'update to v' + json.version;
|
||||||
|
document.getElementById('ext-update').style.padding = '.25rem .5rem';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// .catch(console.error);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function initializeDisableVoteSubmission() {
|
function initializeDisableVoteSubmission() {
|
||||||
|
|||||||
Reference in new issue
Block a user