mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-07 10:44:19 -04: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
|
// here: { chrome: true, webkit: false }, mozilla missing is the
|
||||||
// only difference to jQuery.browser
|
// only difference to jQuery.browser
|
||||||
navigator.userAgent.toLowerCase().replace(
|
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) {
|
function(all, n, v1, v2, rv) {
|
||||||
// Do not set additional browsers once chrome is detected.
|
// Do not set additional browsers once chrome is detected.
|
||||||
if (!browser.chrome) {
|
if (!browser.chrome) {
|
||||||
|
@ -101,6 +101,8 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
||||||
);
|
);
|
||||||
if (browser.chrome)
|
if (browser.chrome)
|
||||||
delete browser.webkit;
|
delete browser.webkit;
|
||||||
|
if (browser.atom)
|
||||||
|
delete browser.chrome;
|
||||||
}
|
}
|
||||||
/*#*/ } // __options.environment == 'browser'
|
/*#*/ } // __options.environment == 'browser'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue