Use button instead of anchor for try reddit link

This commit is contained in:
syeopite 2023-09-17 11:58:14 -07:00
parent 3601d42716
commit 41f82f189b
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
3 changed files with 25 additions and 12 deletions

View File

@ -57,6 +57,11 @@ body {
justify-content: flex-end; justify-content: flex-end;
} }
button.simulated_a {
background: none;
border: none;
}
/* /*
* Channel page * Channel page
@ -497,7 +502,9 @@ span > select {
.light-theme a:active, .light-theme a:active,
.light-theme summary:hover, .light-theme summary:hover,
.light-theme a:focus, .light-theme a:focus,
.light-theme summary:focus { .light-theme summary:focus,
.light-theme .simulated_a:hover,
.light-theme .simulated_a:active {
color: #075A9E !important; color: #075A9E !important;
} }
@ -515,7 +522,7 @@ span > select {
background-color: #fff2; background-color: #fff2;
} }
.light-theme a { .light-theme a, .light-theme .simulated_a {
color: #335d7a; color: #335d7a;
text-decoration: none; text-decoration: none;
} }
@ -536,7 +543,9 @@ span > select {
.no-theme a:active, .no-theme a:active,
.no-theme summary:hover, .no-theme summary:hover,
.no-theme a:focus, .no-theme a:focus,
.no-theme summary:focus { .no-theme summary:focus,
.no-theme .simulated_a:hover,
.no-theme .simulated_a:active {
color: #075A9E !important; color: #075A9E !important;
} }
@ -554,7 +563,7 @@ span > select {
background-color: #fff2; background-color: #fff2;
} }
.no-theme a { .no-theme a, .no-theme .simulated_a{
color: #335d7a; color: #335d7a;
text-decoration: none; text-decoration: none;
} }
@ -588,7 +597,9 @@ span > select {
.dark-theme a:active, .dark-theme a:active,
.dark-theme summary:hover, .dark-theme summary:hover,
.dark-theme a:focus, .dark-theme a:focus,
.dark-theme summary:focus { .dark-theme summary:focus,
.dark-theme .simulated_a:hover,
.dark-theme .simulated_a:active {
color: rgb(0, 182, 240); color: rgb(0, 182, 240);
} }
@ -606,7 +617,7 @@ span > select {
color: #ddd; color: #ddd;
} }
.dark-theme a { .dark-theme a, .dark-theme .simulated_a {
color: #adadad; color: #adadad;
text-decoration: none; text-decoration: none;
} }
@ -642,7 +653,9 @@ body.dark-theme {
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.no-theme a:hover, .no-theme a:hover,
.no-theme a:active, .no-theme a:active,
.no-theme a:focus { .no-theme a:focus,
.no-theme .simulated_a:hover,
.no-theme .simulated_a:active {
color: rgb(0, 182, 240); color: rgb(0, 182, 240);
} }
@ -660,7 +673,7 @@ body.dark-theme {
color: #ddd; color: #ddd;
} }
.no-theme a { .no-theme a, .no-theme .simulated_a{
color: #adadad; color: #adadad;
text-decoration: none; text-decoration: none;
} }

View File

@ -78,9 +78,9 @@ function get_youtube_comments() {
<div id="comments-turned-off-on-video-message" class="h-box v-box"> <div id="comments-turned-off-on-video-message" class="h-box v-box">
<p><b>${video_data.comments_youtube_disabled_text}</b></p> <p><b>${video_data.comments_youtube_disabled_text}</b></p>
<p><b><a href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link"> <p><b><button href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link" class="simulated_a">
${video_data.comments_youtube_disabled_try_reddit} ${video_data.comments_youtube_disabled_try_reddit}
</a></b></p> </button></b></p>
</div>`; </div>`;
document.getElementById("try-reddit-comments-link").onclick = swap_comments; document.getElementById("try-reddit-comments-link").onclick = swap_comments;

View File

@ -319,9 +319,9 @@ we're going to need to do it here in order to allow for translations.
<p> <p>
<b> <b>
<a href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link"> <button data-comments="reddit" id="try-reddit-comments-link" class="simulated_a">
<%=HTML.escape(translate(locale, "comments_youtube_disabled_try_reddit"))%> <%=HTML.escape(translate(locale, "comments_youtube_disabled_try_reddit"))%>
</a> </button>
</b> </b>
</p> </p>
</div> </div>