OneBox Anonymous CodePen


(Mittineague) #1

The OneBox for CodePen is a great feature and is used very often at SitePoint.

However, I question how anonymous codepens are currently handled.

Anonymous codepens do not embed, true “Edit on CodePen” is available, but I’m thinking it would make more sense to simply link here instead of embedding a “can’t be embedded” eg.


(cpradio) #2

The problem is that code pen is serving that up. So Discourse simply sees a valid oembed. Discourse would have to parse it to realize it is sending an anonymous message. I’m not sure that is a good idea.


(Mittineague) #3

Would it be that hard to test for codepen.io/anon/ in the URL? i.e. the /anon/

I’ll poke around some when I get back from shopping.


(Mittineague) #4

After looking through quite a few folders and files, as best I can tell CodePen is using the whitelisted “generic”.

Rather than hack Core for this or write a plugin to modify Core, my feeling is it would be best to write CodePen it’s own Onebox.


(cpradio) #5

Even then, you are still going against an uphill battle. If codepen shifts how they serve it, you’ll constantly be altering it. I really don’t see it as that big of a deal personally, as it fits the beauty of oembed. You simply process the data given and you’re done.


(Mittineague) #6

I suppose it’s not that big of a deal. I’ve yet to see any replies like “Hey, I can’t use your Pen because it’s anonymous”