Skip to content

Commit

Permalink
noPremit -> noPermit - fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
amiad committed Aug 4, 2022
1 parent c0cfbf0 commit d336718
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ new Screenshot({success: img => {

### optional argurments
* `noSupport` - callback for unsupport browser.
* `noPremit` - callback that would run if the user did not confirm the screen share.
* `noPermit` - callback that would run if the user did not confirm the screen share.
* `sound` - play sound when taking screenshot.
* `true` - default sound
* `url` - custom sound (example: `'https://site.my/sound.mp3'`)
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2>Screenshots:</h2>
success: img => {
document.getElementById('screenshots').append(img);
},
noPremit: () => {
noPermit: () => {
alert('Please Allow!');
},
noSupport: () => {
Expand Down
4 changes: 2 additions & 2 deletions screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Screenshot {
})
.catch((e) => {
//console.log('You need to allow screen share');
if (typeof this.args.noPremit == 'function'){
this.args.noPremit();
if (typeof this.args.noPermit == 'function'){
this.args.noPermit();
}
});
}
Expand Down

0 comments on commit d336718

Please sign in to comment.