mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Merge pull request #591 from ponychicken/detectAtomShell
Browser detection: Add Atom shell
This commit is contained in:
commit
809c41b1cf
1 changed files with 3 additions and 1 deletions
|
@ -82,7 +82,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
|||
// here: { chrome: true, webkit: false }, mozilla missing is the
|
||||
// only difference to jQuery.browser
|
||||
navigator.userAgent.toLowerCase().replace(
|
||||
/(opera|chrome|safari|webkit|firefox|msie|trident)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:([.\d]+))?/g,
|
||||
/(opera|chrome|safari|webkit|firefox|msie|trident|atom)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:([.\d]+))?/g,
|
||||
function(all, n, v1, v2, rv) {
|
||||
// Do not set additional browsers once chrome is detected.
|
||||
if (!browser.chrome) {
|
||||
|
@ -101,6 +101,8 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
|||
);
|
||||
if (browser.chrome)
|
||||
delete browser.webkit;
|
||||
if (browser.atom)
|
||||
delete browser.chrome;
|
||||
}
|
||||
/*#*/ } // __options.environment == 'browser'
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue