SuperCerebral

Embeddable Widget for n0tice.com

So we just launched an HTML5 embed-able widget for reports and events on n0tice.

The widget is made up of jQuery and uses data in links (with a class ‘n0tice-recent-wgt’) to call the n0tice API.

As every post on n0tice is effectively a liveblog, the embed executes the main function every 60 seconds to update the HTML shown to the end user. It would be great to modify this at some point to a push style system (similar to Facebook and how they handle notifications) so we don’t abuse the API.

For now the API is more than capable of handling the embed.

<a href="http://n0tice.com/report/4618/" class="n0tice-recent-wgt" data-content-type="report" data-content-id="4618">Knutsford beacon is lit!</a>

<script src="//platform.n0tice.com/embed.js" charset="utf-8" ></script>

The above code transforms the plain link into:

Knutsford beacon is lit!