فهرست منبع

Added tips(resolves issue 388)

aditya 3 سال پیش
والد
کامیت
9d7c3b4869
3فایلهای تغییر یافته به همراه27 افزوده شده و 7 حذف شده
  1. 13 5
      Extensions/combined/popup.css
  2. 2 2
      Extensions/combined/popup.html
  3. 12 0
      Extensions/combined/popup.js

+ 13 - 5
Extensions/combined/popup.css

@@ -49,8 +49,8 @@ button:hover {
   bottom: 1.15rem;
   right: 1.15rem;
   background: var(--secondary);
-  border-radius: .25rem;
-  padding: .25rem .5rem;
+  border-radius: 0.25rem;
+  padding: 0.25rem 0.5rem;
 }
 
 #advancedToggle {
@@ -58,7 +58,8 @@ button:hover {
   background: none;
   box-shadow: none;
   color: var(--lightGrey);
-  top: 26px; right: 26px;
+  top: 26px;
+  right: 26px;
   padding: 2px;
   z-index: 69;
   height: 2rem;
@@ -77,12 +78,13 @@ button:hover {
 #advancedSettings {
   opacity: 0;
   pointer-events: none;
-  transition-duration: .15s;
+  transition-duration: 0.15s;
   transition-timing-function: ease-in-out;
   transform: scale(1.1);
   position: fixed;
   background: var(--background);
-  top: 10px; right: 14px;
+  top: 10px;
+  right: 14px;
   width: calc(100% - 65px);
   height: calc(100% - 58px);
   border: 2px solid var(--secondary);
@@ -161,3 +163,9 @@ input:checked + .slider:before {
   /* filter: invert(21%) sepia(100%) saturate(3618%) hue-rotate(102deg)
     brightness(96%) contrast(108%); */
 }
+
+#tips {
+  border: 3px dashed var(--tertiary);
+  border-radius: 4px;
+  padding: 0.4rem;
+}

+ 2 - 2
Extensions/combined/popup.html

@@ -34,7 +34,7 @@
 
       <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>
       <img
         id="server-status"
@@ -42,7 +42,7 @@
         src="./icons/server.svg"
         alt=""
       />
-
+      
       <br />
       <br />
     </center>

+ 12 - 0
Extensions/combined/popup.js

@@ -13,8 +13,14 @@ const config = {
     donate: "https://returnyoutubedislike.com/donate",
     faq: "https://returnyoutubedislike.com/faq",
   },
+  tips: [
+    'If you have stopped seeing the dislike count, try disabling and re-enabling the plugin.'
+  ]
 };
 
+/* Tips */
+renderTip();
+
 /*   Links   */
 document.getElementById("link_website").addEventListener("click", () => {
   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
 document.querySelector('#login')
 .addEventListener('click', function () {