projects
/
pwl6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable DPR > 1 on Safari due to bugs and performance issues.
[pwl6.git]
/
src
/
yuu
/
core.js
diff --git
a/src/yuu/core.js
b/src/yuu/core.js
index
22a1fb4
..
24e3f2b
100644
(file)
--- a/
src/yuu/core.js
+++ b/
src/yuu/core.js
@@
-7,6
+7,9
@@
(function (yuu) {
"use strict";
(function (yuu) {
"use strict";
+ yuu.isSafari = function (ua) {
+ return /^((?!chrome).)*safari/i.test(ua || navigator.userAgent);
+ };
yuu.require = function (m) {
try { return require(m); }
yuu.require = function (m) {
try { return require(m); }
@@
-93,10
+96,12
@@
wkdoc.dispatchEvent(ev);
});
win.on('new-win-policy', function (frame, url, policy) {
wkdoc.dispatchEvent(ev);
});
win.on('new-win-policy', function (frame, url, policy) {
- if (url.startsWith('chrome'))
+ if (url.startsWith('chrome'))
{
policy.forceNewPopup();
policy.forceNewPopup();
- else
- policy.forceDownload();
+ } else {
+ policy.ignore();
+ gui.Shell.openExternal(url);
+ }
});
}
});
}