Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Mar 7, 2016
1 parent a7e9305 commit 9727128
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
21 changes: 10 additions & 11 deletions js/core/biblio.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// - localBiblio: override or supplement the official biblio with your own.

define(
["core/jquery-enhanced"],
["core/jquery-enhanced", "fetch"],
function ($) {
var getRefKeys = function (conf) {
var informs = conf.informativeReferences
Expand Down Expand Up @@ -159,25 +159,24 @@ define(
.concat(localAliases);
if (refs.length) {
var url = "https://labs.w3.org/specrefs/bibrefs?refs=" + refs.join(",");
$.ajax({
dataType: "json"
, url: url
, success: function (data) {
fetch(url)
.then(function(response){
return response.json()
}).then(function(data){
conf.biblio = data || {};
// override biblio data
if (conf.localBiblio) {
for (var k in conf.localBiblio) conf.biblio[k] = conf.localBiblio[k];
}
bibref(conf, msg);
finish();
}
, error: function (xhr, status, error) {
msg.pub("error", "Error loading references from '" + url + "': " + status + " (" + error + ")");
}).catch(function(err){
msg.pub("error", err);
finish();
}
});
});
} else {
finish();
}
else finish();
}
};
}
Expand Down
6 changes: 3 additions & 3 deletions js/github.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Helpers for the GitHub API.

"use strict";
define(
[],
function () {
["jquery-enhanced"],
function ($) {
function findNext(header) {
// Finds the next URL of paginated resources which
// is available in the Link header. Link headers look like this:
Expand Down
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function(config) {

// configuration
detectBrowsers: {
enabled: true,
enabled: false,
usePhantomJS: false,
postDetection: function(browsers) {
return browsers;
Expand Down Expand Up @@ -57,7 +57,7 @@ module.exports = function(config) {
included: false,
served: true,
}, {
pattern: "node_modules/jquery/dist/jquery.slim.js",
pattern: "node_modules/jquery/dist/*.js",
included: false,
served: true,
}, {
Expand Down Expand Up @@ -119,7 +119,7 @@ module.exports = function(config) {


// See "detectBrowsers"
browsers: ["Chrome", "Safari", "Chrome"],
browsers: ["Chrome"],//, "Safari", "Chrome"],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
Expand Down

0 comments on commit 9727128

Please sign in to comment.