• Resolved benbois

    (@benbois)


    Hi,

    That would be nice to have a browser notifications option in your plugin.

    Also, I added the required option in the input field #sac_chat to enhanced the CSS style (based on this code https://codepen.io/chriscoyier/pen/CiflJ)
    And because, the plugin doesn’t allow to send an empty message, it makes sense to add it permanently in your code, isn’t it?

    What you think?

    Ben

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thank you for the ideas, will try to find time to get them added, hopefully for next update. Adding required attribute should be simple enough, not sure about browser notifications but definitely will take a look.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up with this. I tried adding required to the chat textarea. Testing in Chrome, it pops up a “Please fill out this field” alert after submitting every chat message. Probably similar behavior in other browsers.

    So instead of hard-coding the required attribute, I added a filter that can be used. Just add this code:

    function sac_textarea_atts($atts) { return 'required'; }
    add_filter('sac_textarea_atts', 'sac_textarea_atts');

    That works to add any attributes not just required, as needed.

    New version should be released within a couple of days. Thanks again for the feedback, @benbois.

    Thread Starter benbois

    (@benbois)

    Hi Jeff aka @specialk,
    Thanks for your work.

    You’re right, I didn’t pay attention to this alert message, it is indeed annoying!
    The solution to add a nicer input styles seems to be somewhere else.
    May be by using placeholder.

    I tried to implement browser notification in your code.
    I got some results but notifications seem to not work if the browser is in background on mobile.

    Plugin Author Jeff Starr

    (@specialk)

    Hi Ben, that’s a good idea. If you want to share any code, feel free to send a quick email via my contact form. Thank you.

    Plugin Author Jeff Starr

    (@specialk)

    Thanks Ben, browser notifications are added to the next version of the plugin. Should be available later today.

    Thread Starter benbois

    (@benbois)

    Good news Jeff, thanks to have added it quickly!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘New feature: browser notifications’ is closed to new replies.