Formatting, static site style

This commit is contained in:
Dmitrii Selivanov committed 2021-11-21 14:23:00 +03:00
1 parent 6b96a70876
commit 1027f43503
2 files changed
+25 -15

No files matched your search

@@ -67,14 +67,16 @@ function setState() {
GM_xmlhttpRequest({ GM_xmlhttpRequest({
method: "GET", method: "GET",
responseType: "json", responseType: "json",
url: "https://return-youtube-dislike-api.azurewebsites.net/votes?videoId=" + getVideoId(), url:
onload: function(response) { "https://return-youtube-dislike-api.azurewebsites.net/votes?videoId=" +
getVideoId(),
onload: function (response) {
if (response != undefined) { if (response != undefined) {
const formattedDislike = numberFormat(response.response.dislikes); const formattedDislike = numberFormat(response.response.dislikes);
console.log(response); console.log(response);
setDislikes(formattedDislike); setDislikes(formattedDislike);
} }
} },
}); });
} }
@@ -130,8 +132,8 @@ function setEventListeners(evt) {
} }
} }
(function() { (function () {
'use strict'; "use strict";
window.addEventListener("yt-navigate-finish", setEventListeners, true); window.addEventListener("yt-navigate-finish", setEventListeners, true);
setEventListeners(); setEventListeners();
})(); })();
+18 -10
View File
@@ -12,11 +12,12 @@
<title>Return youtube dislike count</title> <title>Return youtube dislike count</title>
</head> </head>
<body> <body>
<div class="container">
<nav class="navbar navbar-expand-lg navbar-light bg-light"> <nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid"> <div class="container-xxl">
<a class="navbar-brand" href="/">Return youtube dislike count</a> <a class="navbar-brand" href="/">Return youtube dislike count</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarNav"> <div class="collapse navbar-collapse" id="navbarNav">
@@ -39,7 +40,9 @@
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
<div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-lg-8 col-md-10 col-sm-12"> <div class="col-lg-8 col-md-10 col-sm-12">
<h3 class="mt-4">Chrome/Firefox/Usersript extension to return youtube dislike count</h3> <h3 class="mt-4">Chrome/Firefox/Usersript extension to return youtube dislike count</h3>
@@ -80,7 +83,7 @@
<p><a href="files/chrome/return_youtube_dislike0.0.0.2.crx">v_0.0.0.2</a> - Better number formatting added, <p><a href="files/chrome/return_youtube_dislike0.0.0.2.crx">v_0.0.0.2</a> - Better number formatting added,
<p><a href="files/chrome/return_youtube_dislike_LOAD_UNPACKED_0.0.0.3.zip">v_0.0.0.3</a> <p><a href="files/chrome/return_youtube_dislike_LOAD_UNPACKED_0.0.0.3.zip">v_0.0.0.3</a>
<p> 0.0.0.4 <strong> removed (accidental self-ddos)</strong></p> <p> 0.0.0.4 <strong> removed (accidental self-ddos)</strong></p>
<p> <a href="files/chrome/return_youtube_dislike_LOAD_UNPACKED_0.0.0.5.zip">0.0.0.5</a> <p><a href="files/chrome/return_youtube_dislike_LOAD_UNPACKED_0.0.0.5.zip">0.0.0.5</a>
- ratio bar added. Dislikes from every video on page are saved now - ratio bar added. Dislikes from every video on page are saved now
Previous versions are disabled automatically by chrome, because Chrome doesn't like .crx extensions. Previous versions are disabled automatically by chrome, because Chrome doesn't like .crx extensions.
@@ -90,7 +93,8 @@
<h4>Firefox:</h4> <h4>Firefox:</h4>
Install from extension's firefox addon store <a href="https://addons.mozilla.org/en-US/firefox/addon/return-youtube-dislikes/" target="_blank">page</a>. Install from extension's firefox addon store <a
href="https://addons.mozilla.org/en-US/firefox/addon/return-youtube-dislikes/" target="_blank">page</a>.
Check for updates often - this extension is being actively improved Check for updates often - this extension is being actively improved
Latest version coming out as soon as update is approved by Mozilla Latest version coming out as soon as update is approved by Mozilla
@@ -108,12 +112,15 @@
<div class="accordion-body"> <div class="accordion-body">
<div class="card card-body"> <div class="card card-body">
<p> NOT RECOMMENDED! Use firefox addon store <a href="https://addons.mozilla.org/en-US/firefox/addon/return-youtube-dislikes/" target="_blank">link</a> <p> NOT RECOMMENDED! Use firefox addon store <a
href="https://addons.mozilla.org/en-US/firefox/addon/return-youtube-dislikes/"
target="_blank">link</a>
</p> </p>
<p> <p>
<a href="files/ff/youtube_dislike_button-0.0.0.1-fx.xpi">v_0.0.0.1</a> <a href="files/ff/youtube_dislike_button-0.0.0.1-fx.xpi">v_0.0.0.1</a>
</p> </p>
<p><a href="files/ff/youtube_dislike_button-0.0.0.2-fx.xpi">v_0.0.0.2</a> - Better number formatting added <p><a href="files/ff/youtube_dislike_button-0.0.0.2-fx.xpi">v_0.0.0.2</a> - Better number formatting
added
thanks, <strong>bstka</strong> thanks, <strong>bstka</strong>
</p> </p>
</div> </div>
@@ -134,7 +141,8 @@
<h2>Installation on chrome</h2> <h2>Installation on chrome</h2>
<p></p><strong>Before installing new version - please manually delete old version</strong></p> <p></p><strong>Before installing new version - please manually delete old version</strong></p>
<p></p><strong>Chrome might disable this extension - you'll need to delete it and reinstall. </strong> <p></p><strong>Chrome might disable this extension - you'll need to delete it and reinstall. </strong>
This is a temporary problem while awaiting chrome store approval. You might use userscript or firefox extension meanwhile.</p> This is a temporary problem while awaiting chrome store approval. You might use userscript or firefox extension
meanwhile.</p>
<p> Installation is described for Chrome. For firefox extension is available in store</p> <p> Installation is described for Chrome. For firefox extension is available in store</p>