Skip to content

Commit

Permalink
open popup in maxWidth/Height available
Browse files Browse the repository at this point in the history
  • Loading branch information
vdvibhu20 committed May 16, 2024
1 parent 3191fc2 commit 8ae6b25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/pods/components/intermediate-contest-view/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ export default class IntermediateContestComponent extends Component {
}

@action async openTestInNewWindow() {
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', 'popup')
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', `menubar=1,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth}`)
}
}
2 changes: 1 addition & 1 deletion app/pods/contests/contest/index/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ export default class IndexController extends Controller {
}
@action
onAfterCreate() {
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', 'popup')
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, `hackerblocks-contest-${this.contest.id}`, `menubar=0,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth}`)
}
}

0 comments on commit 8ae6b25

Please sign in to comment.