Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
9099f077
Commit
9099f077
authored
Sep 20, 2017
by
Robert Knight
Committed by
GitHub
Sep 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #547 from hypothesis/oauth-popup-polish
Adjust the preferred initial size of the OAuth popup window.
parents
b8537760
02138367
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
oauth-auth.js
src/sidebar/oauth-auth.js
+9
-2
oauth-auth-test.js
src/sidebar/test/oauth-auth-test.js
+1
-1
No files found.
src/sidebar/oauth-auth.js
View file @
9099f077
...
...
@@ -326,8 +326,15 @@ function auth($http, $rootScope, $window,
});
// Authorize user and retrieve grant token
var
width
=
400
;
var
height
=
400
;
// In Chrome & Firefox the sizes passed to `window.open` are used for the
// viewport size. In Safari the size is used for the window size including
// title bar etc. There is enough vertical space at the bottom to allow for
// this.
//
// See https://bugs.webkit.org/show_bug.cgi?id=143678
var
width
=
475
;
var
height
=
430
;
var
left
=
$window
.
screen
.
width
/
2
-
width
/
2
;
var
top
=
$window
.
screen
.
height
/
2
-
height
/
2
;
...
...
src/sidebar/test/oauth-auth-test.js
View file @
9099f077
...
...
@@ -535,7 +535,7 @@ describe('sidebar.oauth-auth', function () {
fakeWindow
.
open
,
'about:blank'
,
'Login to Hypothesis'
,
'height=4
00,left=312,top=184,width=400
'
'height=4
30,left=274.5,top=169,width=475
'
);
var
authPopup
=
fakeWindow
.
open
.
returnValues
[
0
];
assert
.
equal
(
authPopup
.
location
.
href
,
expectedAuthUrl
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment