Skip to content

Commit

Permalink
Updated cors proxy for codewars
Browse files Browse the repository at this point in the history
  • Loading branch information
codemzy committed Oct 1, 2018
1 parent de43686 commit a98b4db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/codebadges.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/codebadges.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if (typeof jQuery === 'undefined') {
});
},
_codewarsAPI: function(name, callback) {
var url = 'https://cors.now.sh/' + 'https://www.codewars.com/users/' + name; // scraping via cors.now.sh due to CORS
var url = 'https://cors-anywhere.herokuapp.com/' + 'https://www.codewars.com/users/' + name; // scraping via cors.now.sh due to CORS
$.get(url, function(data){
var points = data.match(/Honor:<\/b>(.+?)<\/div>/m)[1];
var kyu = data.match(/Rank:<\/b>(.+?)<\/div>/m)[1];
Expand Down

0 comments on commit a98b4db

Please sign in to comment.