projects
/
pwl6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change how HTML links are handled.
[pwl6.git]
/
src
/
yuu
/
core.js
diff --git
a/src/yuu/core.js
b/src/yuu/core.js
index
25d3ed2
..
22a1fb4
100644
(file)
--- a/
src/yuu/core.js
+++ b/
src/yuu/core.js
@@
-70,6
+70,9
@@
/** Initialize Yuu and call all registered hooks
*/
/** Initialize Yuu and call all registered hooks
*/
+ document.body.className += (navigator.standalone || gui)
+ ? " standalone" : " browser";
+
if (gui) {
var win = gui.Window.get();
var nativeMenuBar = new gui.Menu({ type: "menubar" });
if (gui) {
var win = gui.Window.get();
var nativeMenuBar = new gui.Menu({ type: "menubar" });
@@
-89,6
+92,12
@@
wkdoc.hidden = false;
wkdoc.dispatchEvent(ev);
});
wkdoc.hidden = false;
wkdoc.dispatchEvent(ev);
});
+ win.on('new-win-policy', function (frame, url, policy) {
+ if (url.startsWith('chrome'))
+ policy.forceNewPopup();
+ else
+ policy.forceDownload();
+ });
}
return new Promise(function (resolve) {
}
return new Promise(function (resolve) {