This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.querySelector('html').ondragenter = function(e) { | |
| e.stopPropagation(); | |
| return false; | |
| }; | |
| document.querySelector('html').ondragover = function(e) { | |
| e.stopPropagation(); | |
| return false; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('html').on('dragenter dragover', function(e) { | |
| e.stopPropagation(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // assuming str is used to hold a string | |
| if (str !== undefined && str !== null && str.length > 0) { | |
| console.log('str is a non-empty string'); | |
| } | |
| if (str) { | |
| console.log('str is a non-empty string'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (window.File) { | |
| console.log('your browser supports the File API'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (41 === 'potato' || window.File) { | |
| console.log('reality is melting and the number 41 is now a potato, or your browser supports the File API'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var obj = incomingObj || {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var obj = firstChoiceObj || secondChoiceObj || thirdChoiceObj || {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git stash save "I'll come back to this later" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git stash list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stash@{0}: On branch1: Adding more ponies to site footer | |
| stash@{1}: On branch1: Tightening up the graphics on level 3 | |
| stash@{2}: On branch2: I'll come back to this later |