Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot toggle upvote #31

Open
laymonage opened this issue May 5, 2021 · 12 comments
Open

Cannot toggle upvote #31

laymonage opened this issue May 5, 2021 · 12 comments
Assignees
Labels
bug Something isn't working upstream Need fixes from upstream

Comments

@laymonage
Copy link
Member

laymonage commented May 5, 2021

I've already done this in #18 but for some reason GitHub throws FORBIDDEN errors. Maybe we need to ping some hubbers and see what's the issue?

@laymonage laymonage added the bug Something isn't working label May 5, 2021
@laymonage laymonage mentioned this issue May 5, 2021
21 tasks
@laymonage laymonage added the upstream Need fixes from upstream label May 5, 2021
@laymonage laymonage self-assigned this May 5, 2021
@laymonage laymonage changed the title Implement upvote toggle Cannot toggle upvote May 9, 2021
@laymonage
Copy link
Member Author

Upstream discussion: community/community#3968

@laymonage
Copy link
Member Author

laymonage commented Jun 3, 2021

Update: they're aware of this problem and have put this on their to-do list.

@alejandrohdezma
Copy link
Contributor

I noticed Giscus adds an upvote to any user comment, is it related to this issue?

@laymonage
Copy link
Member Author

@alejandrohdezma yeah it's already implemented, but it doesn't work until GitHub allows toggling upvotes using the API with an app-issued token.

@alejandrohdezma
Copy link
Contributor

Good to know! Thanks! 😸

@username0136
Copy link

@laymonage Can you please hide .gsc-upvote-button gsc-social-reaction-summary-item with css until then it starts working, I am telling this just because it doesn't looks good when visitors see something is broken is there any way I can inject css for me only into that iframe?

@LukePrior
Copy link

Yeah having an option to toggle a simple CSS rule that set display: none on gsc-upvote-button would be great.

@SeryiBaran
Copy link

SeryiBaran commented Jul 28, 2022

Yeah having an option to toggle a simple CSS rule that set display: none on gsc-upvote-button would be great.

I made a couple of themes that add only these styles:
https://github.com/SeryiBaran/seryibaran.github.io/tree/4e11d4f648f3f65d015cf426d774a1537cb5f63d/assets/GSThemes

@TracyYXChen
Copy link

@laymonage is it possible to hide the upvote button since it does not function properly? I tested the script manually on my page in the console but it can't hide it. Thanks in advance!

let elements = document.getElementsByClassName('gsc-upvote-button');
for(let i=0; i < elements.length; i++){
                        elements[i].style.display = 'none';
 }

@laymonage
Copy link
Member Author

Given that it's been two years and GitHub still hasn't fixed this, I've opted to disable the button and change the styling a bit. I don't hide it completely as I think it's still useful to see the number of upvotes on the comment.

@ouuan
Copy link
Contributor

ouuan commented Aug 12, 2023

I don't hide it completely as I think it's still useful to see the number of upvotes on the comment.

Maybe there could be an option to hide it?

@laymonage
Copy link
Member Author

Sorry, I don't like to add an option that would likely be removed in the future. If you really want to hide it, you can use a custom theme or self-host giscus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Need fixes from upstream
Projects
None yet
Development

No branches or pull requests

7 participants