Added tips(resolves issue 388)

This commit is contained in:
aditya committed 2022-01-09 20:16:13 +05:30
1 parent e77cdeb2ed
commit 9d7c3b4869
3 files changed
+26 -6

No files matched your search

+13 -5
View File
@@ -49,8 +49,8 @@ button:hover {
bottom: 1.15rem; bottom: 1.15rem;
right: 1.15rem; right: 1.15rem;
background: var(--secondary); background: var(--secondary);
border-radius: .25rem; border-radius: 0.25rem;
padding: .25rem .5rem; padding: 0.25rem 0.5rem;
} }
#advancedToggle { #advancedToggle {
@@ -58,7 +58,8 @@ button:hover {
background: none; background: none;
box-shadow: none; box-shadow: none;
color: var(--lightGrey); color: var(--lightGrey);
top: 26px; right: 26px; top: 26px;
right: 26px;
padding: 2px; padding: 2px;
z-index: 69; z-index: 69;
height: 2rem; height: 2rem;
@@ -77,12 +78,13 @@ button:hover {
#advancedSettings { #advancedSettings {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
transition-duration: .15s; transition-duration: 0.15s;
transition-timing-function: ease-in-out; transition-timing-function: ease-in-out;
transform: scale(1.1); transform: scale(1.1);
position: fixed; position: fixed;
background: var(--background); background: var(--background);
top: 10px; right: 14px; top: 10px;
right: 14px;
width: calc(100% - 65px); width: calc(100% - 65px);
height: calc(100% - 58px); height: calc(100% - 58px);
border: 2px solid var(--secondary); border: 2px solid var(--secondary);
@@ -161,3 +163,9 @@ input:checked + .slider:before {
/* filter: invert(21%) sepia(100%) saturate(3618%) hue-rotate(102deg) /* filter: invert(21%) sepia(100%) saturate(3618%) hue-rotate(102deg)
brightness(96%) contrast(108%); */ brightness(96%) contrast(108%); */
} }
#tips {
border: 3px dashed var(--tertiary);
border-radius: 4px;
padding: 0.4rem;
}
+1 -1
View File
@@ -34,7 +34,7 @@
<br /> <br />
<br /> <br />
<div style=" margin: 0rem 2rem 0rem 2rem; color: var(--lightGrey);" id="tips"></div>
<p style="display: none">API Status: <b id="status"></b></p> <p style="display: none">API Status: <b id="status"></b></p>
<img <img
id="server-status" id="server-status"
+12
View File
@@ -13,8 +13,14 @@ const config = {
donate: "https://returnyoutubedislike.com/donate", donate: "https://returnyoutubedislike.com/donate",
faq: "https://returnyoutubedislike.com/faq", faq: "https://returnyoutubedislike.com/faq",
}, },
tips: [
'If you have stopped seeing the dislike count, try disabling and re-enabling the plugin.'
]
}; };
/* Tips */
renderTip();
/* 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 });
@@ -114,6 +120,12 @@ function handleDisableVoteSubmissionChangeEvent(value) {
} }
})(); })();
function renderTip(){
document.getElementById('tips').innerText = config.tips[Math.floor(Math.random()*config.tips.length)];
}
/* popup-script.js /* popup-script.js
document.querySelector('#login') document.querySelector('#login')
.addEventListener('click', function () { .addEventListener('click', function () {