?simple option on embed

Not moving the entire discussion over from GitHub but the idea was to add a ?simple flag on the embed script that would simply not output any HTML at all, just the emoji and status. The use case at the time was because I could not get the emoji and status to exist inline together and also have text-align: justify; on the status, I think.

1 Like

Just knocked this one out! Sorry it took so long.

Here’s an example of the usage:

  <script src="https://status.lol/foobar.js?simple"></script>

The generated output will be in a <span> (so, inline) with a class of statuslol_container in case you ever wanted to style it—but as a span, it won’t interfere with any existing markup/structure. Inside the span, you’ll get the raw unicode emoji as well as the plain, un-messed-with content.

Let me know if you have any questions or run into any issues with this. Thanks for the suggestion!


I just noticed something I didn’t think of: this also just passes through any Markdown, whereas the non-simple version parses it to HTML.

I can make it parse the Markdown if that’s what you’d prefer, no problem.

1 Like

Is preferred. Thanks.

1 Like

Done! By default, Markdown wants to put everything — even a single line of text — in <p> tags… so I filtered those out. Looks solid on this end but let me know if you run into anything weird.

1 Like

Is it possible to combine other options with ?simple? For example, <script src="https://status.lol/foobar.js?pretty&no-emoji"></script> works as expected, but <script src="https://status.lol/foobar.js?simple&no-emoji"></script> still shows the emoji (although it all appears in a span, as expected).

1 Like

Sure! Just slipped in that update now, so you should be good to go.

1 Like