From 9d7cc8ffc0f1f57c601b424c159cada4f4c00922 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 27 Jan 2017 15:43:52 +0000 Subject: [PATCH 01/29] fix: update tax rates Yay... :'( --- lib/stripe/utils/vat-rates.json | 340 ++++++++------------------------ 1 file changed, 87 insertions(+), 253 deletions(-) diff --git a/lib/stripe/utils/vat-rates.json b/lib/stripe/utils/vat-rates.json index b213e51a..29a5d61b 100644 --- a/lib/stripe/utils/vat-rates.json +++ b/lib/stripe/utils/vat-rates.json @@ -1,256 +1,90 @@ - { - "last_updated": "2016-01-01T22:34Z", - "disclaimer": "This data is compiled from official European Commission sources to be as accurate as possible, however no guarantee of accuracy is provided. Use at your own risk. Don't trust random people on the internet without doing your own research.", - - "rates": { - "AT": { - "country": "Austria", - "standard_rate": 20.00, - "reduced_rate": 10.00, - "reduced_rate_alt": 13.00, - "super_reduced_rate": false, - "parking_rate": 12.00 - }, - "BE": { - "country": "Belgium", - "standard_rate": 21.00, - "reduced_rate": 12.00, - "reduced_rate_alt": 6.00, - "super_reduced_rate": false, - "parking_rate": 12.00 - }, - "BG": { - "country": "Bulgaria", - "standard_rate": 20.00, - "reduced_rate": 9.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "CY": { - "country": "Cyprus", - "standard_rate": 19.00, - "reduced_rate": 9.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "CZ": { - "country": "Czech Republic", - "standard_rate": 21.00, - "reduced_rate": 15.00, - "reduced_rate_alt": 10.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "DK": { - "country": "Denmark", - "standard_rate": 25.00, - "reduced_rate": false, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "DE": { - "country": "Germany", - "standard_rate": 19.00, - "reduced_rate": 7.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "EE": { - "country": "Estonia", - "standard_rate": 20.00, - "reduced_rate": 9.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "EL": { - "_comment": "While the EU uses the country code 'EL' for Greece, ISO uses 'GR' - both are included for convenience.", - "iso_duplicate": "GR", - "country": "Greece", - "standard_rate": 23.00, - "reduced_rate": 13.00, - "reduced_rate_alt": 6.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "GR": { - "_comment": "Duplicate of EL for convenience; the EU uses the country code 'EL' for Greece, while ISO uses 'GR'.", - "iso_duplicate_of": "EL", - "country": "Greece", - "standard_rate": 23.00, - "reduced_rate": 13.00, - "reduced_rate_alt": 6.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "ES": { - "country": "Spain", - "standard_rate": 21.00, - "reduced_rate": 10.00, - "reduced_rate_alt": false, - "super_reduced_rate": 4.00, - "parking_rate": false - }, - "FI": { - "country": "Finland", - "standard_rate": 24.00, - "reduced_rate": 14.00, - "reduced_rate_alt": 10.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "FR": { - "country": "France", - "standard_rate": 20.00, - "reduced_rate": 10.00, - "reduced_rate_alt": 5.50, - "super_reduced_rate": 2.10, - "parking_rate": false - }, - "HR": { - "country": "Croatia", - "standard_rate": 25.00, - "reduced_rate": 13.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "IT": { - "country": "Italy", - "standard_rate": 22.00, - "reduced_rate": 10.00, - "reduced_rate_alt": 4.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "LV": { - "country": "Latvia", - "standard_rate": 21.00, - "reduced_rate": 12.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "LT": { - "country": "Lithuania", - "standard_rate": 21.00, - "reduced_rate": 9.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "LU": { - "country": "Luxembourg", - "standard_rate": 17.00, - "reduced_rate": 14.00, - "reduced_rate_alt": 8.00, - "super_reduced_rate": 3.00, - "parking_rate": 12.00 - }, - "HU": { - "country": "Hungary", - "standard_rate": 27.00, - "reduced_rate": 18.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "IE": { - "country": "Ireland", - "standard_rate": 23.00, - "reduced_rate": 13.50, - "reduced_rate_alt": 9.00, - "super_reduced_rate": 4.80, - "parking_rate": 13.50 - }, - "MT": { - "country": "Malta", - "standard_rate": 18.00, - "reduced_rate": 7.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "NL": { - "country": "Netherlands", - "standard_rate": 21.00, - "reduced_rate": 6.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "PL": { - "country": "Poland", - "standard_rate": 23.00, - "reduced_rate": 8.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "PT": { - "country": "Portugal", - "standard_rate": 23.00, - "reduced_rate": 13.00, - "reduced_rate_alt": 6.00, - "super_reduced_rate": false, - "parking_rate": 13.00 - }, - "RO": { - "country": "Romania", - "standard_rate": 20.00, - "reduced_rate": 9.00, - "reduced_rate_alt": 5.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "SI": { - "country": "Slovenia", - "standard_rate": 22.00, - "reduced_rate": 9.50, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "SK": { - "country": "Slovakia", - "standard_rate": 20.00, - "reduced_rate": 10.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "SE": { - "country": "Sweden", - "standard_rate": 25.00, - "reduced_rate": 12.00, - "reduced_rate_alt": 6.00, - "super_reduced_rate": false, - "parking_rate": false - }, - "UK": { - "_comment": "While the EU uses the country code 'UK' for the United Kingdom, ISO uses 'GB' - both are included for convenience.", - "iso_duplicate": "GB", - "country": "United Kingdom", - "standard_rate": 20.00, - "reduced_rate": 5.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - }, - "GB": { - "_comment": "Duplicate of GB for convenience; the EU uses the country code 'UK' for the United Kingdom, while ISO uses 'GB'.", - "iso_duplicate_of": "UK", - "country": "United Kingdom", - "standard_rate": 20.00, - "reduced_rate": 5.00, - "reduced_rate_alt": false, - "super_reduced_rate": false, - "parking_rate": false - } + "last_updated": "2017-01-27", + "notes": "generated using @remy/eu-tax-rates/lib/convert.js", + "rates": { + "AT": { + "standard_rate": 20 + }, + "BE": { + "standard_rate": 21 + }, + "BG": { + "standard_rate": 20 + }, + "CY": { + "standard_rate": 19 + }, + "CZ": { + "standard_rate": 21 + }, + "DE": { + "standard_rate": 19 + }, + "DK": { + "standard_rate": 25 + }, + "EE": { + "standard_rate": 20 + }, + "ES": { + "standard_rate": 21 + }, + "FI": { + "standard_rate": 24 + }, + "FR": { + "standard_rate": 20 + }, + "GB": { + "standard_rate": 20 + }, + "GR": { + "standard_rate": 24 + }, + "HR": { + "standard_rate": 25 + }, + "HU": { + "standard_rate": 27 + }, + "IE": { + "standard_rate": 23 + }, + "IT": { + "standard_rate": 22 + }, + "LT": { + "standard_rate": 21 + }, + "LU": { + "standard_rate": 17 + }, + "LV": { + "standard_rate": 21 + }, + "MT": { + "standard_rate": 18 + }, + "NL": { + "standard_rate": 21 + }, + "PL": { + "standard_rate": 23 + }, + "PT": { + "standard_rate": 23 + }, + "RO": { + "standard_rate": 19 + }, + "SE": { + "standard_rate": 25 + }, + "SI": { + "standard_rate": 22 + }, + "SK": { + "standard_rate": 20 } + } } From d467e3753ff4ec8ee4a0c40b259a05ab6fde0a19 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 27 Jan 2017 15:44:19 +0000 Subject: [PATCH 02/29] 3.41.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1033d93..4cf8c828 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.40.3", + "version": "3.41.0", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From 52f016208b70b6e2d0ca79d30bd7cdcb9d17f967 Mon Sep 17 00:00:00 2001 From: Michael Graf Date: Fri, 17 Feb 2017 13:47:23 +0100 Subject: [PATCH 03/29] Updated OpenUI5 library entry to latest theme (#2955) - sap_belize is the new default for OpenUI5 since version 1.40 - the URL is our CDN (Content Delivery Network) - switched order of description --- public/js/editors/libraries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/editors/libraries.js b/public/js/editors/libraries.js index e878035e..0c1c7b5c 100644 --- a/public/js/editors/libraries.js +++ b/public/js/editors/libraries.js @@ -684,10 +684,10 @@ var libraries = [ 'url': { 'url': 'https://openui5.hana.ondemand.com/resources/sap-ui-core.js', 'id': 'sap-ui-bootstrap', - 'data-sap-ui-theme': 'sap_bluecrystal', + 'data-sap-ui-theme': 'sap_belize', 'data-sap-ui-libs': 'sap.m' }, - 'label': 'OpenUI5 latest (Mobile BlueCrystal)' + 'label': 'OpenUI5 CDN (belize Theme, mobile library)' }, { 'url': 'https://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.7/TweenMax.min.js', From bc642894b81371bdc9847fe9a75a34fd6b86ab40 Mon Sep 17 00:00:00 2001 From: Mark van Straten Date: Fri, 17 Feb 2017 13:49:00 +0100 Subject: [PATCH 04/29] Update RxJs 5.0.0-beta to 5.0.3 final (#2975) RxJs 5 has been released --- public/js/editors/libraries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/editors/libraries.js b/public/js/editors/libraries.js index 0c1c7b5c..8fb036d9 100644 --- a/public/js/editors/libraries.js +++ b/public/js/editors/libraries.js @@ -740,8 +740,8 @@ var libraries = [ 'label': 'Blaze CSS (latest)' }, { - 'url': 'https://unpkg.com/@reactivex/rxjs@5.0.0-beta.7/dist/global/Rx.umd.js', - 'label': 'RxJS 5.0.0-beta.7', + 'url': 'https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js', + 'label': 'RxJS 5.0.3', 'group': 'RxJS' }, { From a347c25379d0dc65e00f0f8f1543a2da02164a0e Mon Sep 17 00:00:00 2001 From: Giulia Alfonsi Date: Fri, 17 Feb 2017 12:49:23 +0000 Subject: [PATCH 05/29] #2459 Fixed export to gist by adding github token to user settings (#2981) * Fixed export to gist by adding github token to user settings * Removed the token from user.js and fixed the copy of the user data --- lib/handlers/bin.js | 2 +- public/js/jsbin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlers/bin.js b/lib/handlers/bin.js index f93255d5..b594e462 100644 --- a/lib/handlers/bin.js +++ b/lib/handlers/bin.js @@ -967,7 +967,7 @@ module.exports = Observable.extend({ }); // only expose the parts of the user we want - var userfields = 'avatar name bincount created pro settings'; + var userfields = 'avatar name bincount created pro settings github_token'; jsbin.user = _.pick.apply(_, [user].concat(userfields.split(' '))); if (!jsbin.user.avatar && req.session.user) { diff --git a/public/js/jsbin.js b/public/js/jsbin.js index daeadd5e..de5b0857 100644 --- a/public/js/jsbin.js +++ b/public/js/jsbin.js @@ -132,7 +132,7 @@ function exposeSettings() { if (isDOM(window.jsbin) || !window.jsbin || !window.jsbin.state) { // because...STUPIDITY!!! window.jsbin = { - user: window.jsbin.user, + user: $.extend(true, {}, window.jsbin.user, jsbin.user), 'static': jsbin['static'], version: jsbin.version, analytics: jsbin.analytics, From ab1538799b20d36cfcfde79bf6526933e1b6c0e9 Mon Sep 17 00:00:00 2001 From: Chris Getsfred Date: Fri, 17 Feb 2017 07:49:55 -0500 Subject: [PATCH 06/29] Fix for #2833, console.assert wrong output (#2951) --- public/js/render/console.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/js/render/console.js b/public/js/render/console.js index ff0c77a6..35b2f16e 100644 --- a/public/js/render/console.js +++ b/public/js/render/console.js @@ -266,6 +266,17 @@ window._console = { clear: function () { output.innerHTML = ''; }, + assert: function() { + if (arguments.length === 0 || !eval(arguments[0])) { + var msg = []; + for(var p in arguments) { + if (p === "0") continue; + msg.push(arguments[p]); + } + var assertionMsg = msg.join(' ') || 'console.assert' + log('Assertion failed: '+assertionMsg, 'error'); + } + }, log: function () { var l = arguments.length, i = 0; for (; i < l; i++) { From ae8a8abdd7863e6eac4228dd038b010d254f7192 Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 17 Feb 2017 12:50:33 +0000 Subject: [PATCH 07/29] Update Blaze CDN link (#2914) * Update libraries.js * Added a missing comma --- public/js/editors/libraries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/editors/libraries.js b/public/js/editors/libraries.js index 8fb036d9..0f63e27f 100644 --- a/public/js/editors/libraries.js +++ b/public/js/editors/libraries.js @@ -734,7 +734,7 @@ var libraries = [ }, { 'url': [ - 'https://unpkg.com/blaze', + 'https://unpkg.com/blaze/dist/blaze.min.css', 'https://unpkg.com/blaze/dist/blaze.colors.min.css' ], 'label': 'Blaze CSS (latest)' From 37a506495e8344678bf35e080e42177b7f549010 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 17 Feb 2017 14:06:19 +0000 Subject: [PATCH 08/29] make oembed smaler --- lib/handlers/oembed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlers/oembed.js b/lib/handlers/oembed.js index a673518a..d9fd69e3 100644 --- a/lib/handlers/oembed.js +++ b/lib/handlers/oembed.js @@ -14,8 +14,8 @@ oembed.embed = function(req, res, next) { var embedUrl = url.replace(/\/edit\b/, '/embed'); var callback = req.query.callback; - var width = req.query.maxwidth || 640; - var height = req.query.maxheight || 480; + var width = req.query.maxwidth || 320; + var height = req.query.maxheight || 240; var oembed = { type: 'rich', From f3c03e554615cd17453039e665782938b36644dc Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 17 Feb 2017 14:07:44 +0000 Subject: [PATCH 09/29] 3.41.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4cf8c828..586f5811 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.0", + "version": "3.41.1", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From 21083be48024611db65913f5f977b61671513101 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 17 Feb 2017 16:06:40 +0000 Subject: [PATCH 10/29] fix --- lib/routes.js | 13 ++++++++++++- views/inject-ad.js.html | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/routes.js b/lib/routes.js index 9e178fb0..6406c7a2 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -643,10 +643,21 @@ module.exports = function (app) { json: true, }, function (error, response, body) { if (error || response.statusCode !== 200) { + console.log(error); return res.end(); } - res.render('inject-ad.js.html', { layout: false, ad: body.ads[0] }); + var ad = body.ads.filter(function (ad) { + return !!ad.active; + }).shift(); + + var pixels = (ad.pixel || '').split('||'); + var time = Math.round(Date.now() / 10000) | 0; + var imgs = pixels.map(function (pixel) { + return ''; + }); + + res.render('inject-ad.js.html', { layout: false, ad: ad, imgs: imgs }); }) }); diff --git a/views/inject-ad.js.html b/views/inject-ad.js.html index 23f89d6d..9676a60c 100644 --- a/views/inject-ad.js.html +++ b/views/inject-ad.js.html @@ -1,4 +1,4 @@ -document.getElementById('bsaapi').innerHTML = '{{ad.description}}{{#if ad.pixel}}{{/if}}'; +document.getElementById('bsaapi').innerHTML = '{{ad.description}}{{#each imgs}}{{{.}}}{{/each}}'; {{#if ad.description}}$('body').addClass('bsaapi');{{/if}} $('#bsaapi a').click(function () { jsbin.analytics.track('ad', 'click', 'bsa'); From cc5138483fea4a2b397da6946c9aff14d785415d Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 17 Feb 2017 16:06:53 +0000 Subject: [PATCH 11/29] 3.41.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 586f5811..99802290 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.1", + "version": "3.41.2", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From 0789fe1e9b0b05e0050954e140f69aa0e3ccf410 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 24 Feb 2017 12:25:10 +0000 Subject: [PATCH 12/29] chore: tweak title --- views/inject-ad.js.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/inject-ad.js.html b/views/inject-ad.js.html index 9676a60c..1bf27583 100644 --- a/views/inject-ad.js.html +++ b/views/inject-ad.js.html @@ -1,4 +1,4 @@ -document.getElementById('bsaapi').innerHTML = '{{ad.description}}{{#each imgs}}{{{.}}}{{/each}}'; +document.getElementById('bsaapi').innerHTML = '{{ad.title}}: {{ad.description}}{{#each imgs}}{{{.}}}{{/each}}'; {{#if ad.description}}$('body').addClass('bsaapi');{{/if}} $('#bsaapi a').click(function () { jsbin.analytics.track('ad', 'click', 'bsa'); From c53f7e3869212511e7efd648040cf836e8071d75 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 24 Feb 2017 12:25:20 +0000 Subject: [PATCH 13/29] 3.41.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99802290..508b229a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.2", + "version": "3.41.3", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From 35659f8f53951d6ce800c2bf911be7a7ea9653ee Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 3 Mar 2017 14:46:35 +0000 Subject: [PATCH 14/29] fix: country code for greece (EL not GR) --- views/partials/country.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/partials/country.html b/views/partials/country.html index 6df0799e..137ada23 100644 --- a/views/partials/country.html +++ b/views/partials/country.html @@ -82,7 +82,7 @@ - + @@ -242,4 +242,4 @@ - \ No newline at end of file + From 6bded3e6daf309faddb995b5789e0e2497d01760 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 3 Mar 2017 14:46:46 +0000 Subject: [PATCH 15/29] 3.41.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 508b229a..9ddbf89f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.3", + "version": "3.41.4", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From ba53bfd1d2e3f5a6b5a2b9a7f03d54c5a8e97cef Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 3 Mar 2017 15:21:51 +0000 Subject: [PATCH 16/29] fix: move to taxtools GR validation wasn't working --- public/css/style.css | 4 ++++ public/css/upgrade.css | 5 +++++ public/js/account/pay.js | 7 ++++--- views/partials/payment.html | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index dc39d12d..294d1818 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -4802,3 +4802,7 @@ body.min #bin .editbox .CodeMirror pre { #bsaapi a:hover { color: inherit; } + +.fadeout { + color: #ccc; +} diff --git a/public/css/upgrade.css b/public/css/upgrade.css index 46e65f51..9c8f31a2 100644 --- a/public/css/upgrade.css +++ b/public/css/upgrade.css @@ -890,3 +890,8 @@ input.invalid { small { font-size: smaller; } + +.fadeout, +.fadeout a { + color: #ccc; +} diff --git a/public/js/account/pay.js b/public/js/account/pay.js index feeec3e6..09aecf32 100644 --- a/public/js/account/pay.js +++ b/public/js/account/pay.js @@ -145,11 +145,12 @@ jQuery(function ($) { if (vatNum) { vatEl.addClass('validating'); - $.getJSON('//vat-validator.herokuapp.com/' + vat + '?callback=?', function (data) { - if (data.error) { + $.getJSON('https://taxtools.io/api/validate/' + vat, function (data) { + if (!data.verified) { return setTimeout(function () { + console.log('API request failed, trying again'); $('#validateVat').click(); - }, 2000); + }, 3000); } if (data) { diff --git a/views/partials/payment.html b/views/partials/payment.html index e16c5287..4bd79e90 100644 --- a/views/partials/payment.html +++ b/views/partials/payment.html @@ -65,6 +65,7 @@
+ Powered by taxtools.io From aeba4f707d0cccee97368ab8b528329f107d6322 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 3 Mar 2017 15:22:06 +0000 Subject: [PATCH 17/29] 3.41.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9ddbf89f..bc1a172a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.4", + "version": "3.41.5", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From 359e42f8f05886f445bb358bba3b16ba09f139a8 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Tue, 7 Mar 2017 17:04:13 +0000 Subject: [PATCH 18/29] fix: always use given country when testing VAT --- lib/stripe/utils/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/stripe/utils/index.js b/lib/stripe/utils/index.js index 723c216a..054f49a7 100644 --- a/lib/stripe/utils/index.js +++ b/lib/stripe/utils/index.js @@ -13,13 +13,17 @@ function getVATByCountry(countrycode) { } function countryIsInEU(countrycode) { - var EU = ['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'GB', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK']; + var EU = ['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'EL', 'GR', 'ES', 'FI', 'FR', 'GB', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK']; return EU.indexOf((countrycode||'').toUpperCase()) !== -1; } function getCountry(customer) { var card = customer.default_card; // jshint ignore:line + if (customer.metadata.country && customer.metadata.vat) { // this comes from the VATIN + return customer.metadata.country.toUpperCase(); + } + var country = customer.cards.data.reduce(function (last, current) { if (current.id === card) { return current.country; From 29d4813b93cc367299692ff9ba5d34bba3fb92f5 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Tue, 7 Mar 2017 17:04:41 +0000 Subject: [PATCH 19/29] 3.41.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc1a172a..f33d3075 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.5", + "version": "3.41.6", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From e584df2b945e0248392c2e14bab9288d1b63f411 Mon Sep 17 00:00:00 2001 From: Simon Thiele Date: Tue, 7 Mar 2017 20:19:03 +0100 Subject: [PATCH 20/29] Update libraries.js (#2949) update from three 72 -> 82 --- public/js/editors/libraries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/editors/libraries.js b/public/js/editors/libraries.js index 0f63e27f..50e21f58 100644 --- a/public/js/editors/libraries.js +++ b/public/js/editors/libraries.js @@ -647,9 +647,9 @@ var libraries = [ }, { 'url':[ - 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r72/three.min.js' + 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r82/three.min.js' ], - 'label': 'Three.js r72' + 'label': 'Three.js r82' }, { 'url':[ From 3013bc935a3581d6b6d68922bdb4cb7524b23895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E5=BD=B1?= Date: Wed, 8 Mar 2017 03:19:32 +0800 Subject: [PATCH 21/29] :bug:fixed deletion bug while using sqlite (#2963) --- lib/db/sqlite.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/db/sqlite.js b/lib/db/sqlite.js index 2c5ff656..aa697944 100644 --- a/lib/db/sqlite.js +++ b/lib/db/sqlite.js @@ -593,7 +593,7 @@ module.exports = utils.inherit(Object, { function updateMultipleFields(sqlTemplate, columnsArray) { - return function (bin, params, fn) { + return function (args, params, fn) { var values = []; var queries = Object.keys(params).map(function(key) { if (columnsArray.indexOf(key) === -1) { @@ -603,8 +603,7 @@ function updateMultipleFields(sqlTemplate, columnsArray) { return '`' + key + '`=?'; }); - values.push(bin.url); - values.push(bin.revision); + values = values.concat(args); var sql = sqlTemplate.replace('`:field`=?', queries.join(', ')); From 015eae0958dcc3ad9cf450bae2c827c06b606872 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 24 Mar 2017 14:48:34 +0000 Subject: [PATCH 22/29] 3.41.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f33d3075..ea62d01e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.6", + "version": "3.41.7", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From b5542a739dcc98d4e3ab3723da656084a9b82973 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 24 Mar 2017 14:55:49 +0000 Subject: [PATCH 23/29] fix: try to get jsbin to build again in prod --- package.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ea62d01e..197d2dcb 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "start": "(sleep 2 && open http://localhost:3000) & ./bin/jsbin", "test": "node_modules/mocha/bin/_mocha -t 25000 --ui bdd test/unit/**/*.test.js", ":install": "build/install.js", - "postinstall": "grunt build && npm run selenium:install", + "postinstall": "grunt build", + "// disabled": " && npm run selenium:install", "postversion": "git push origin master && git push --tags origin master", "preupdate": "node build/pre-update.js", "postupdate": "node build/post-update.js commit", @@ -86,17 +87,17 @@ "grunt-contrib-uglify": "~0.2.2", "hbs-utils": "0.0.3", "mocha": "~1.21.4", - "mocha-casperjs": "~0.5.0", - "nightwatch": "^0.9.6", "proxyquire": "^1.7.10", - "selenium-standalone": "^5.5.0", "should": "~1.2.2", "sinon": "~1.7.3", "tap": "^6.3.2", "tap-only": "0.0.5" }, "optionalDependencies": { - "zmq": "~2.6.0" + "zmq": "~2.6.0", + "mocha-casperjs": "~0.5.0", + "nightwatch": "^0.9.6", + "selenium-standalone": "^5.5.0", }, "engines": { "node": ">=0.10.16 <0.11" From b3455881d40fa240a5f5bcfd6430bd1771b681d7 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 24 Mar 2017 14:56:28 +0000 Subject: [PATCH 24/29] chore: typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 197d2dcb..bd07bf50 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "zmq": "~2.6.0", "mocha-casperjs": "~0.5.0", "nightwatch": "^0.9.6", - "selenium-standalone": "^5.5.0", + "selenium-standalone": "^5.5.0" }, "engines": { "node": ">=0.10.16 <0.11" From 5b7a4a615879956d556d9aa258d7b7e7fe451bec Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Fri, 24 Mar 2017 14:56:41 +0000 Subject: [PATCH 25/29] 3.41.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd07bf50..ae55605e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.7", + "version": "3.41.8", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From a140dbf86679da43a03e8bc36a9f57367330eb72 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Mon, 27 Mar 2017 21:39:38 +0100 Subject: [PATCH 26/29] fix: minor display annoyances --- lib/handlers/bin.js | 4 ++-- public/css/style.css | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/handlers/bin.js b/lib/handlers/bin.js index b594e462..fc169011 100644 --- a/lib/handlers/bin.js +++ b/lib/handlers/bin.js @@ -1301,7 +1301,7 @@ module.exports = Observable.extend({ helpers = this.helpers, jsbin = JSON.stringify({ version: helpers.production ? helpers.set('version') : 'debug', root: helpers.url('', true), - static: helpers.urlForStatic() + static: helpers.urlForStatic('', true) }); @@ -1319,7 +1319,7 @@ module.exports = Observable.extend({ } else { res.render('list', { list_history: html, jsbin: jsbin, - static: helpers.urlForStatic(), + static: helpers.urlForStatic('', true), scripts: [ '/js/vendor/jquery-1.11.0.min.js', '/js/vendor/pretty-date.js', '/js/render/saved-history-preview.js' diff --git a/public/css/style.css b/public/css/style.css index 294d1818..a1eecf63 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -2364,6 +2364,8 @@ left: 50%; width: 100px; padding-left: 20px; padding-right: 20px; + overflow: hidden; + text-overflow: ellipsis; } #history .url .snapshot { @@ -2429,7 +2431,9 @@ left: 50%; /* Archive */ /* By default, don't show archived rows */ -#history tr.archived { +#history tr.archived, +#history tr.archived + tr.spacer + { display: none; } From 0c7e6ff514409648db4a8decd98b8d3a82996f5f Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Mon, 27 Mar 2017 21:39:51 +0100 Subject: [PATCH 27/29] 3.41.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae55605e..26853b2d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.8", + "version": "3.41.9", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", From 1e5734e5576406686db3ad9f8884c0397b0c5406 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Thu, 13 Apr 2017 10:39:56 +0100 Subject: [PATCH 28/29] fix: smaller line numbers Plus trying out fullstory --- public/css/style.css | 4 ++++ views/index.html | 17 +++++++++++++++++ views/user.html | 6 ++++++ 3 files changed, 27 insertions(+) diff --git a/public/css/style.css b/public/css/style.css index a1eecf63..88f0e6b0 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1653,6 +1653,10 @@ li.CodeMirror-hint-active { padding-left: 0; } +.CodeMirror-linenumber { + font-size: 12px; +} + #jsbin .CodeMirror-Tern-tooltip, #jsbin .CodeMirror-hints { border: 1px solid #aaa; diff --git a/views/index.html b/views/index.html index 8e632b32..2d9caaba 100644 --- a/views/index.html +++ b/views/index.html @@ -35,6 +35,23 @@ {{/if}} + diff --git a/views/user.html b/views/user.html index f625efbd..e004d05e 100644 --- a/views/user.html +++ b/views/user.html @@ -9,6 +9,12 @@ var jsbin = { (function () { if (jsbin.user && jsbin.user.name) { + if (window.FS) { + FS.identify(jsbin.user.name, { + displayName: jsbin.user.name, + reviewsWritten_int: 14, + }); + } $('.loggedout').hide(); var menu = $('.loggedin').show(); var html = $('#profile-template').text(); From c1cd023b3211669aaa77b304db3159ae8eba163a Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Thu, 13 Apr 2017 10:40:15 +0100 Subject: [PATCH 29/29] 3.41.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26853b2d..b8defe4d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.41.9", + "version": "3.41.10", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin",