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

Cookiefix #12

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2abcb41
added gitignore
sam1360 Mar 28, 2017
284c731
Merge remote-tracking branch 'upstream/master'
sam1360 Mar 28, 2017
6142284
Minor code style changes
sam1360 Mar 28, 2017
be586ec
more minor changes
sam1360 Mar 28, 2017
a95b4a2
Merge branch 'master' of github.com:mozillascience/citation-web-server
sam1360 Apr 10, 2017
fd0afad
Style changes to the code and touched up package.json
sam1360 Apr 13, 2017
6e8608a
Merge remote-tracking branch 'upstream/master'
sam1360 Apr 13, 2017
98cd670
Added oauthToken and did some cleanup with jslint
sam1360 Apr 13, 2017
79909bc
****NOT WORKING****added github secret route and partially added gith…
sam1360 Apr 13, 2017
76fe295
Merge remote-tracking branch 'upstream/master'
sam1360 May 2, 2017
cdcaed9
Small change in package.json
sam1360 May 2, 2017
b39c84a
updated version number
sam1360 May 2, 2017
5356793
changes to make server to properly run on heroku
sam1360 May 2, 2017
b2926bb
Merge branch 'master' of github.com:mozillascience/citation-web-server
sam1360 May 9, 2017
dab0aae
Merge branch 'master' of https://git.heroku.com/software-citation
sam1360 May 9, 2017
d75bd04
Fix to make it so the cookie wont be overwritten
sam1360 May 10, 2017
763367f
Fix to make it so the cookie wont be overwritten
sam1360 May 10, 2017
70ad072
Merge branch 'cookiefix' of github.com:sam1360/citation-web-server in…
sam1360 May 10, 2017
dd27280
client id change
sam1360 May 10, 2017
c6c2122
Fix formatting for pr.
sam1360 May 10, 2017
ea0fefc
Updated the citation core
sam1360 May 11, 2017
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"homepage": "https://github.com/sam1360/citation-web-server#readme",
"dependencies": {
"body-parser": "^1.17.0",
"citation-core": "^1.1.1",
"citation-core": "^1.2.0",
"express": "^4.15.0",
"request": "^2.81.0"
},
Expand Down
14 changes: 12 additions & 2 deletions public/js/httpController.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ function getCitation() {
url: src,
};

$.post(`${window.location.href.slice(0, window.location.href.indexOf('?'))}v01/citation/`, data)
const citationUrl = window.location.protocol + "//" + window.location.hostname + "/v01/citation";


$.post(citationUrl, data)
.done((returnData) => {
if (returnData.citation) {
replaceCitation(returnData.citation);
Expand All @@ -136,5 +139,12 @@ $('#citeBtn').click((evt) => {
});

if (urlParams.has('code')) {
getGitHubToken();
if (~document.cookie.indexOf('gitHubToken=')) {

}
else {
getGitHubToken();
}
}