Skip to content

Commit

Permalink
Recompile after fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbany committed May 30, 2017
1 parent a7ab681 commit 4d39d80
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 89 deletions.
89 changes: 46 additions & 43 deletions dist/CommentCoreLibrary.js
Expand Up @@ -996,7 +996,7 @@ var CommentManager = (function() {
this.runline = [];
this.position = 0;
this.limiter = 0;

this.factory = null;
this.filter = null;
this.csa = {
Expand Down Expand Up @@ -1134,7 +1134,7 @@ var CommentManager = (function() {
};

CommentManager.prototype.rescale = function () {

// TODO: Implement rescaling
};

CommentManager.prototype.send = function (data) {
Expand Down Expand Up @@ -1423,13 +1423,13 @@ var CommentProvider = (function () {
/**
* Provider for HTTP content. This returns a promise that resolves to TEXT.
*
* @param method - HTTP method to use
* @param url - Base URL
* @param responseType - type of response expected.
* @param args - Arguments for query string. Note: This is only used when
* @param {string} method - HTTP method to use
* @param {string} url - Base URL
* @param {string} responseType - type of response expected.
* @param {Object} args - Arguments for query string. Note: This is only used when
* method is POST or PUT
* @param body - Text body content. If not provided will omit a body
* @return Promise that resolves or rejects based on the success or failure
* @param {any} body - Text body content. If not provided will omit a body
* @return {Promise} that resolves or rejects based on the success or failure
* of the request
**/
CommentProvider.BaseHttpProvider = function (method, url, responseType, args, body) {
Expand All @@ -1441,15 +1441,13 @@ var CommentProvider = (function () {
var argsArray = [];
for (var key in args) {
if (args.hasOwnProperty(key)) {
argsArray.push(encodeURIComponent(key) +
argsArray.push(encodeURIComponent(key) +
'=' + encodeURIComponent(args[key]));
}
}
uri += argsArray.join('&');
}

xhr.responseType = typeof responseType === "string" ?
responseType : "";
xhr.onload = function () {
if (this.status >= 200 && this.status < 300) {
resolve(this.response);
Expand All @@ -1463,6 +1461,11 @@ var CommentProvider = (function () {
};

xhr.open(method, uri);

// Limit the response type based on input
xhr.responseType = typeof responseType === "string" ?
responseType : "";

if (typeof body !== 'undefined') {
xhr.send(body);
} else {
Expand All @@ -1474,12 +1477,12 @@ var CommentProvider = (function () {
/**
* Provider for JSON content. This returns a promise that resolves to JSON.
*
* @param method - HTTP method to use
* @param url - Base URL
* @param args - Arguments for query string. Note: This is only used when
* @param {string} method - HTTP method to use
* @param {string} url - Base URL
* @param {Object} args - Arguments for query string. Note: This is only used when
* method is POST or PUT
* @param body - Text body content. If not provided will omit a body
* @return Promise that resolves or rejects based on the success or failure
* @param {any} body - Text body content. If not provided will omit a body
* @return {Promise} that resolves or rejects based on the success or failure
* of the request
**/
CommentProvider.JSONProvider = function (method, url, args, body) {
Expand All @@ -1492,12 +1495,12 @@ var CommentProvider = (function () {
/**
* Provider for XML content. This returns a promise that resolves to Document.
*
* @param method - HTTP method to use
* @param url - Base URL
* @param args - Arguments for query string. Note: This is only used when
* @param {string} method - HTTP method to use
* @param {string} url - Base URL
* @param {Object} args - Arguments for query string. Note: This is only used when
* method is POST or PUT
* @param body - Text body content. If not provided will omit a body
* @return Promise that resolves or rejects based on the success or failure
* @param {any} body - Text body content. If not provided will omit a body
* @return {Promise} that resolves or rejects based on the success or failure
* of the request
**/
CommentProvider.XMLProvider = function (method, url, args, body) {
Expand All @@ -1510,12 +1513,12 @@ var CommentProvider = (function () {
/**
* Provider for text content. This returns a promise that resolves to Text.
*
* @param method - HTTP method to use
* @param url - Base URL
* @param args - Arguments for query string. Note: This is only used when
* @param {string} method - HTTP method to use
* @param {string} url - Base URL
* @param {Object} args - Arguments for query string. Note: This is only used when
* method is POST or PUT
* @param body - Text body content. If not provided will omit a body
* @return Promise that resolves or rejects based on the success or failure
* @param {any} body - Text body content. If not provided will omit a body
* @return {Promise} that resolves or rejects based on the success or failure
* of the request
**/
CommentProvider.TextProvider = function (method, url, args, body) {
Expand All @@ -1530,14 +1533,14 @@ var CommentProvider = (function () {
* NOTE: Multiple static sources will race to determine the initial comment
* list so it is imperative that they all parse to the SAME content.
*
* @param source - Promise that resolves to one of the supported types
* @param type - Type that the provider resolves to
* @return this
* @param {Provider} source - Promise that resolves to one of the supported types
* @param {Type} type - Type that the provider resolves to
* @return {CommentProvider} this
**/
CommentProvider.prototype.addStaticSource = function (source, type) {
if (this._destroyed) {
throw new Error(
'Comment provider has been destroyed, ' +
'Comment provider has been destroyed, ' +
'cannot attach more sources.');
}
if (!(type in this._staticSources)) {
Expand All @@ -1551,14 +1554,14 @@ var CommentProvider = (function () {
* Attaches a dynamic source to the corresponding type
* NOTE: Multiple dynamic sources will collectively provide comment data.
*
* @param source - Listenable that resolves to one of the supported types
* @param type - Type that the provider resolves to
* @return this
* @param {DynamicProvider} source - Listenable that resolves to one of the supported types
* @param {Type} type - Type that the provider resolves to
* @return {CommentProvider} this
**/
CommentProvider.prototype.addDynamicSource = function (source, type) {
if (this._destroyed) {
throw new Error(
'Comment provider has been destroyed, ' +
'Comment provider has been destroyed, ' +
'cannot attach more sources.');
}
if (!(type in this._dynamicSources)) {
Expand All @@ -1571,8 +1574,8 @@ var CommentProvider = (function () {
/**
* Attaches a target comment manager so that we can stream comments to it
*
* @param commentManager - Comment Manager instance to attach to
* @return this
* @param {CommentManager} commentManager - Comment Manager instance to attach to
* @return {CommentProvider} this
**/
CommentProvider.prototype.addTarget = function (commentManager) {
if (this._destroyed) {
Expand All @@ -1592,14 +1595,14 @@ var CommentProvider = (function () {
* Adds a parser for an incoming data type. If multiple parsers are added,
* parsers added later take precedence.
*
* @param parser - Parser spec compliant parser
* @param type - Type that the provider resolves to
* @return this
* @param {CommentParser} parser - Parser spec compliant parser
* @param {Type} type - Type that the provider resolves to
* @return {CommentProvider} this
**/
CommentProvider.prototype.addParser = function (parser, type) {
if (this._destroyed) {
throw new Error(
'Comment provider has been destroyed, ' +
'Comment provider has been destroyed, ' +
'cannot attach more parsers.');
}
if (!(type in this._parsers)) {
Expand Down Expand Up @@ -1656,9 +1659,9 @@ var CommentProvider = (function () {
};

/**
* Reloads static comments
* (Re)loads static comments
*
* @return Promise that is resolved when the static sources have been
* @return {Promise} that is resolved when the static sources have been
* loaded
*/
CommentProvider.prototype.load = function () {
Expand Down Expand Up @@ -1688,7 +1691,7 @@ var CommentProvider = (function () {
/**
* Commit the changes and boot up the provider
*
* @return Promise that is resolved when all the static sources are loaded
* @return {Promise} that is resolved when all the static sources are loaded
* and all the dynamic sources are hooked up
**/
CommentProvider.prototype.start = function () {
Expand Down
3 changes: 1 addition & 2 deletions dist/CommentCoreLibrary.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/CommentManager.js
Expand Up @@ -52,7 +52,7 @@ var CommentManager = (function() {
this.runline = [];
this.position = 0;
this.limiter = 0;

this.factory = null;
this.filter = null;
this.csa = {
Expand Down Expand Up @@ -190,7 +190,7 @@ var CommentManager = (function() {
};

CommentManager.prototype.rescale = function () {

// TODO: Implement rescaling
};

CommentManager.prototype.send = function (data) {
Expand Down

0 comments on commit 4d39d80

Please sign in to comment.