This is awful (edit: that's a bit harsh! I mean "not ideal") for three reasons:
The embed_code in the query string makes each script URL unique. From what I've tested it isn't actually needed, though in future this may change. Why it isn't a data attribute I don't know.
To customise the widget colour a class of dark can be added. Not a data attribute, not even a namespaced class, just dark.
Worst of all, the <script> element must be a child of the .quora-follow-button element. Therefore it must be duplicated for every instance. The suggested code doesn't even have async set.
All the script does is create an iframe. There is no API exposed to activate new instances. Socialite could very easily create the iframe itself but since none of this is documented we can't rely on the implementation remaining the same in future (the way we can with Facebook's documented iframe).
Socialite assumes each network (or group of widgets) requires one script element for all instances (the sensible way every other network works I've encountered). From what I can see we'll have to bypass this for Quora else it'll require a lot of changes in the core.
Implementing the Quora Follow Button in Socialite may be tricky.
The normal embed code looks like this:
This is awful (edit: that's a bit harsh! I mean "not ideal") for three reasons:
embed_code
in the query string makes each script URL unique. From what I've tested it isn't actually needed, though in future this may change. Why it isn't a data attribute I don't know.dark
can be added. Not a data attribute, not even a namespaced class, justdark
.<script>
element must be a child of the.quora-follow-button
element. Therefore it must be duplicated for every instance. The suggested code doesn't even haveasync
set.All the script does is create an iframe. There is no API exposed to activate new instances. Socialite could very easily create the iframe itself but since none of this is documented we can't rely on the implementation remaining the same in future (the way we can with Facebook's documented iframe).
Socialite assumes each network (or group of widgets) requires one script element for all instances (the sensible way every other network works I've encountered). From what I can see we'll have to bypass this for Quora else it'll require a lot of changes in the core.