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

The "emotes" button under the comment box in the reddit redesign is not present. #61

Open
mclabs15 opened this issue Feb 16, 2018 · 4 comments

Comments

@mclabs15
Copy link

The beta version of reddit's new interface has no emotes button under the comment box. I've included some example HTML of the comments page here.

@Shugabuga
Copy link
Contributor

I am trying to close this issue and it seems like Reddit keeps on doing the weirdest of things. For one, it seems like Reddit is making the text boxes load after the page loads (this was added yesterday from the looks of it), as well as the new modals (a la the tweet previews on Twitter Web) making everything difficult (not that I even gotten to that stage) and the fact that the comment boxes is <div /> and not consistent (not a <textarea /> or <input />.

Oh yeah, Reddit also seemed to have also stopped rendering emotes, as the bpm-emote bpmote-EMOTENAME tags are not being added anymore.

@ByzantineFailure
Copy link
Contributor

Well, regarding the text box appearing after the page loads, you may do something like what discord does:

function waitByQuerySelector(selector, callback) {
    var element = document.querySelector(selector);
    if(!element) {
        window.setTimeout(function() { waitByQuerySelector(selector, callback); }, 100);
    } else {
        callback(element);
    }
}

This, of course, becomes more difficult if they're constantly changing class names, but it's all I've got for you. Obv. something like a MutationObserver required for child comment boxes. Or something. I'm spitballing on the bus at 8:30 here.

@Shugabuga
Copy link
Contributor

This, of course, becomes more difficult if they're constantly changing class names

At least for the submit button and its location, you can use more intermediate query selectors to try to work around the changing classes. Something like document.querySelector("button[type=\"submit\"]") does the trick if I am not mistaken.

@ByzantineFailure
Copy link
Contributor

ByzantineFailure commented Apr 8, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants