calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.45k stars 235 forks source link

Is there a way to make the send button visible by default? #962

Closed mopoIo closed 1 year ago

mopoIo commented 1 year ago

I would like to have the Send emote visible on my room since by default it looks empty without it. I tried some approaches using javascript but I can't manage to make it visible.

imagen imagen

I can add the button using javascript but I'm not so sure about how I can make it send what's on the chatline, I tried using keydown and emulate and enter press on the chatline, but it didn't work and also I feel like this is a very dirty way to make this hahaha. Is there an easier way? Thanks!

calzoneman commented 1 year ago

I'm not aware of this button, so I assume it is coming from some kind of custom channel script and not a core feature. I suggest you follow up with whoever wrote the script that adds this button.

On Mon, Dec 12, 2022, 10:25 mopolo @.***> wrote:

I would like to have the Send emote visible on my room since by default it looks empty without it. I tried some approaches using javascript but I can't manage to make it visible.

[image: imagen] https://user-images.githubusercontent.com/41168773/207124018-05549903-4839-450b-888a-2c8de41ede3a.png [image: imagen] https://user-images.githubusercontent.com/41168773/207124050-2b75a374-4a5e-4eef-b1ea-e7dca25f4a29.png

I can add the button using javascript but I'm not so sure about how I can make it send what's on the chatline, I tried using keydown and emulate and enter press on the chatline, but it didn't work and also I feel like this is a very dirty way to make this hahaha. Is there an easier way? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/calzoneman/sync/issues/962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC6FCCTCJHVY4UZYA5HHPLWM5UZHANCNFSM6AAAAAAS4ILPJI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mopoIo commented 1 year ago

Ohh it's the send button that comes by default with sync after you enable it from settings, I just changed the format of it, is there a way to make it visible by default?

calzoneman commented 1 year ago

If you mean the "Add a send button to chat" setting, I actually had forgotten that existed, if I remember correctly that was a workaround for ancient mobile browsers (that almost certainly no longer exist) which lacked the ability to press Enter on the virtual keyboard to send the message. It really shouldn't need to be used by anyone anymore.

With that said, it is currently implemented as a user setting, which means that if you would like the button to be displayed, you can enable the setting for yourself, otherwise, you can leave it off (when you click save in the settings, it should preserve across reloads at least within the same browser session). You shouldn't try to control how other users choose to view the page; if another user decides that they think the button belongs there they can enable the setting for themselves.

calzoneman commented 1 year ago

As I suspected, this was a hack for ancient mobile browsers: https://github.com/calzoneman/sync/issues/127

mopoIo commented 1 year ago

Thank you for the reply. I understand how having the option there is useful, but on my design it looks better with the button there since the rest of the css was coded for the button to be visible. I understand your reasoning and how it's not worth putting the time on a per-case scenario and it's best to look at the bigger picture. Do you think there's a workaround to make the button visible by default or is forking the website the only way? Again, thank you for the replies.

calzoneman commented 1 year ago

If your CSS looks out of place when users are using default settings, then I would suggest fixing your CSS instead of trying to override user settings. I can't really advise on a way to do the latter because I've never tried to do it, sorry.

mopoIo commented 1 year ago

Yeah looks out of place cause the design is made for the button to be visible since it looks better that way, I appreciate your time, I'll go ahead and close this. Cheers