Skip to content
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

Library path change #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Here's a table that will come in handy:
#### Step 1: Copy library

You will need to copy the [oauth2 library][oauth2crx] into your chrome
extension root into a directory called `oauth2`.
extension root into a directory called `oauth2`. This can be a clone of
the repository if you wish.

#### Step 2: Inject content script

Expand Down Expand Up @@ -128,7 +129,7 @@ post][blog].
[gapi]: https://code.google.com/apis/console/
[goauth2]: http://code.google.com/apis/accounts/docs/OAuth2.html
[oauth crx]: http://code.google.com/chrome/extensions/tut_oauth.html
[oauth2crx]: https://github.com/borismus/oauth2-extensions/tree/master/lib
[oauth2crx]: https://github.com/borismus/oauth2-extensions/tree/master

[github]: https://github.com/borismus/oauth2-extensions/
[google code]: http://code.google.com/p/oauth2-extensions/
Expand Down
2 changes: 1 addition & 1 deletion lib/oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ OAuth2.loadAdapter = function(adapterName, callback) {
var head = document.querySelector('head');
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/oauth2/adapters/' + adapterName + '.js';
script.src = '/oauth2/lib/adapters/' + adapterName + '.js';
script.addEventListener('load', function() {
callback();
});
Expand Down
2 changes: 1 addition & 1 deletion lib/oauth2_inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ params += '&from=' + encodeURIComponent(url);

// Redirect back to the extension itself so that we have priveledged
// access again
var redirect = chrome.extension.getURL('oauth2/oauth2.html');
var redirect = chrome.extension.getURL('oauth2/lib/oauth2.html');
window.location = redirect + params;
3 changes: 2 additions & 1 deletion samples/cp-oauth2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ for dir in *
do
if [ "`basename $0`" != "$dir" ]
then
cp -r ../lib/ $dir/oauth2/
mkdir -p $dir/oauth2/lib
cp -r ../lib/ $dir/oauth2/lib/
echo "Copied OAuth 2.0 library to $dir"
fi
done