diff --git a/oma-profile/oma.js b/oma-profile/oma.js index 786722f..e465141 100644 --- a/oma-profile/oma.js +++ b/oma-profile/oma.js @@ -47,6 +47,7 @@ define([ , "core/highlight" , "core/best-practices" , "core/figures" +, "oma/biblio" // must be included before core/biblio , "core/biblio" , "core/webidl-contiguous" , "core/webidl-oldschool" diff --git a/oma-profile/oma/biblio.js b/oma-profile/oma/biblio.js new file mode 100644 index 0000000..a59d40d --- /dev/null +++ b/oma-profile/oma/biblio.js @@ -0,0 +1,27 @@ +// oma/biblio +// This should be removed and references should be integrated with the +// specref database. + +define( + [], + function () { + return { + run: function (conf, doc, cb, msg) { + msg.pub("start", "oma/biblio"); + + $.ajax({ + url: "http://oma-services.herokuapp.com/refdb.json", + dataType: "json", + success: function(data) { + conf.localBiblio = data; + }, + error: function(xhr, status, error) { + } + }); + + msg.pub("end", "oma/biblio"); + cb(); + } + }; + } +);