Skip to content

Commit

Permalink
Release 1.13.5
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSwitch committed Aug 31, 2016
1 parent b8bc4f3 commit 60d01f9
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
16 changes: 13 additions & 3 deletions dist/hello.all.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! hellojs v1.13.4 | (c) 2012-2016 Andrew Dodson | MIT https://adodson.com/hello.js/LICENSE */
/*! hellojs v1.13.5 | (c) 2012-2016 Andrew Dodson | MIT https://adodson.com/hello.js/LICENSE */
// ES5 Object.create
if (!Object.create) {

Expand Down Expand Up @@ -1520,7 +1520,7 @@ hello.utils.extend(hello.utils, {
var res = 'result' in p && p.result ? JSON.parse(p.result) : false;

// Trigger the callback on the parent
parent[p.callback](res);
callback(parent, p.callback)(res);
closeWindow();
}

Expand Down Expand Up @@ -1570,7 +1570,7 @@ hello.utils.extend(hello.utils, {
var str = JSON.stringify(obj);

try {
parent[cb](str);
callback(parent, cb)(str);
}
catch (e) {
// Error thrown whilst executing parent callback
Expand All @@ -1580,6 +1580,16 @@ hello.utils.extend(hello.utils, {
closeWindow();
}

function callback(parent, callbackID) {
if (callbackID.indexOf('_hellojs_') !== 0) {
return function() {
throw 'Could not execute callback ' + callbackID;
};
}

return parent[callbackID];
}

function closeWindow() {

if (window.frameElement) {
Expand Down
6 changes: 3 additions & 3 deletions dist/hello.all.min.js

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions dist/hello.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! hellojs v1.13.4 | (c) 2012-2016 Andrew Dodson | MIT https://adodson.com/hello.js/LICENSE */
/*! hellojs v1.13.5 | (c) 2012-2016 Andrew Dodson | MIT https://adodson.com/hello.js/LICENSE */
// ES5 Object.create
if (!Object.create) {

Expand Down Expand Up @@ -1520,7 +1520,7 @@ hello.utils.extend(hello.utils, {
var res = 'result' in p && p.result ? JSON.parse(p.result) : false;

// Trigger the callback on the parent
parent[p.callback](res);
callback(parent, p.callback)(res);
closeWindow();
}

Expand Down Expand Up @@ -1570,7 +1570,7 @@ hello.utils.extend(hello.utils, {
var str = JSON.stringify(obj);

try {
parent[cb](str);
callback(parent, cb)(str);
}
catch (e) {
// Error thrown whilst executing parent callback
Expand All @@ -1580,6 +1580,16 @@ hello.utils.extend(hello.utils, {
closeWindow();
}

function callback(parent, callbackID) {
if (callbackID.indexOf('_hellojs_') !== 0) {
return function() {
throw 'Could not execute callback ' + callbackID;
};
}

return parent[callbackID];
}

function closeWindow() {

if (window.frameElement) {
Expand Down
4 changes: 2 additions & 2 deletions dist/hello.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hellojs",
"version": "1.13.4",
"version": "1.13.5",
"description": "A clientside Javascript library for standardizing requests to OAuth2 web services (and OAuth1 - with a shim)",
"homepage": "https://adodson.com/hello.js",
"main": "dist/hello.all.js",
Expand Down

0 comments on commit 60d01f9

Please sign in to comment.