mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-22 06:13:07 +01:00
fix missing styles for rate bar
add missing css styles for rate bar, copied over from content-style.css
This commit is contained in:
1 parent
6ac28aad2f
commit
1bbece0228
1 file changed
+37
@@ -16,6 +16,7 @@
|
||||
// @downloadURL https://github.com/Anarios/return-youtube-dislike/raw/main/Extensions/UserScript/Return%20Youtube%20Dislike.user.js
|
||||
// @updateURL https://github.com/Anarios/return-youtube-dislike/raw/main/Extensions/UserScript/Return%20Youtube%20Dislike.user.js
|
||||
// @grant GM.xmlHttpRequest
|
||||
// @grant GM_addStyle
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
function cLog(text, subtext = '') {
|
||||
@@ -75,6 +76,42 @@ function setDislikes(dislikesCount) {
|
||||
getButtons().children[1].querySelector("#text").innerText = dislikesCount;
|
||||
}
|
||||
|
||||
(typeof GM_addStyle != 'undefined'
|
||||
? GM_addStyle
|
||||
: styles => {
|
||||
var styleNode = document.createElement("style")
|
||||
styleNode.type = "text/css";
|
||||
styleNode.innerText = styles;
|
||||
document.head.appendChild(styleNode);
|
||||
})(`
|
||||
#return-youtube-dislike-bar-container {
|
||||
background: var(--yt-spec-icon-disabled);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#return-youtube-dislike-bar {
|
||||
background: var(--yt-spec-text-primary);
|
||||
border-radius: 2px;
|
||||
transition: all 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
.ryd-tooltip {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 2px;
|
||||
top: 9px;
|
||||
}
|
||||
|
||||
.ryd-tooltip-bar-container {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 28px;
|
||||
top: -6px;
|
||||
}
|
||||
`);
|
||||
|
||||
function createRateBar(likes, dislikes) {
|
||||
var rateBar = document.getElementById("return-youtube-dislike-bar-container");
|
||||
|
||||
|
||||
Reference in new issue
Block a user