Add screen edge detection

- Using information from pull request #1330 as well as in the issue conversation.
- Ignored `.map` files.

Based on code by @MattDease and @fenisteel
Nesting here is unnecessary, and deliberately left out. See https://github.com/harvesthq/chosen/pull/1320#issuecomment-20518201