-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor to common (work in progress) #141
Conversation
} | ||
|
||
function getAutocompleteSuggestions(query, callback) { | ||
$.getJSON("https://suggestqueries.google.com/complete/search?callback=?", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monicacheung this was from bb3b87c, why is callback=?
in the URL? Does it have any effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shakeelmohamed To use jsonp for cross-domain request. Without it, we'll see origin not allowed err.
See #137 When this is actually done, js/zap-common.js will be moved into a bower module and end up moving to something like: bower_components/zap-common/index.js
0673fc5
to
ef9c68e
Compare
On a side note, we can get rid of the file:// running site locally err if in the google dev console, you remove whatever's in "Accept requests from these HTTP referrers (web sites) (Optional)". |
return videoInfo; | ||
} | ||
} | ||
/*eslint-enable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getVideoDescription() should go in this file too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, although I'm not sure it will be used by another project
@monicacheung Yeah, but the restrictions are there to prevent abuse. I can't justify removing them at this time, since it's only going to affect contributors. |
Refactor many functions into a common file Eventually, we'll have a npm/bower package for the common code.
This is very much a work in progress, but I wanted to get the bulk of it started.
When this is actually done,
js/zap-common.js
will be moved into a bower module and end up moving to something like:bower_components/zap-common/index.js
Looking for some feedback here @zen-audio-player/contributors 😃