Merge branch 'Carpetsmoker-modal-js-dialogs'
This commit is contained in:
commit
0ddf1316f7
@ -36,6 +36,7 @@ Added
|
|||||||
- New arguments `--top-navigate` and `--bottom-navigate` (`-t`/`-b`) for `:scroll-page` to specify a navigation action (e.g. automatically go to the next page when arriving at the bottom).
|
- New arguments `--top-navigate` and `--bottom-navigate` (`-t`/`-b`) for `:scroll-page` to specify a navigation action (e.g. automatically go to the next page when arriving at the bottom).
|
||||||
- New flag `-d`/`--detach` for `:spawn` to detach the spawned process so it's not closed when qutebrowser is.
|
- New flag `-d`/`--detach` for `:spawn` to detach the spawned process so it's not closed when qutebrowser is.
|
||||||
- New (hidden) command `:follow-selected` (bound to `Enter`/`Ctrl-Enter` by default) to follow the link which is currently selected (e.g. after searching via `/`).
|
- New (hidden) command `:follow-selected` (bound to `Enter`/`Ctrl-Enter` by default) to follow the link which is currently selected (e.g. after searching via `/`).
|
||||||
|
- New setting `ui -> modal-js-dialog` to use the standard modal dialogs for javascript questions instead of using the statusbar.
|
||||||
|
|
||||||
Changed
|
Changed
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
@ -141,8 +141,8 @@ Contributors, sorted by the number of commits in descending order:
|
|||||||
* Artur Shaik
|
* Artur Shaik
|
||||||
* Antoni Boucher
|
* Antoni Boucher
|
||||||
* ZDarian
|
* ZDarian
|
||||||
* Peter Vilim
|
|
||||||
* Martin Tournoij
|
* Martin Tournoij
|
||||||
|
* Peter Vilim
|
||||||
* John ShaggyTwoDope Jenkins
|
* John ShaggyTwoDope Jenkins
|
||||||
* Jimmy
|
* Jimmy
|
||||||
* Zach-Button
|
* Zach-Button
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
|<<ui-hide-statusbar,hide-statusbar>>|Whether to hide the statusbar unless a message is shown.
|
|<<ui-hide-statusbar,hide-statusbar>>|Whether to hide the statusbar unless a message is shown.
|
||||||
|<<ui-window-title-format,window-title-format>>|The format to use for the window title. The following placeholders are defined:
|
|<<ui-window-title-format,window-title-format>>|The format to use for the window title. The following placeholders are defined:
|
||||||
|<<ui-hide-mouse-cursor,hide-mouse-cursor>>|Whether to hide the mouse cursor.
|
|<<ui-hide-mouse-cursor,hide-mouse-cursor>>|Whether to hide the mouse cursor.
|
||||||
|
|<<ui-modal-js-dialog,modal-js-dialog>>|Use standard JavaScript modal dialog for alert() and confirm()
|
||||||
|==============
|
|==============
|
||||||
|
|
||||||
.Quick reference for section ``network''
|
.Quick reference for section ``network''
|
||||||
@ -594,6 +595,17 @@ Valid values:
|
|||||||
|
|
||||||
Default: +pass:[false]+
|
Default: +pass:[false]+
|
||||||
|
|
||||||
|
[[ui-modal-js-dialog]]
|
||||||
|
=== modal-js-dialog
|
||||||
|
Use standard JavaScript modal dialog for alert() and confirm()
|
||||||
|
|
||||||
|
Valid values:
|
||||||
|
|
||||||
|
* +true+
|
||||||
|
* +false+
|
||||||
|
|
||||||
|
Default: +pass:[false]+
|
||||||
|
|
||||||
== network
|
== network
|
||||||
Settings related to the network.
|
Settings related to the network.
|
||||||
|
|
||||||
|
@ -478,17 +478,23 @@ class BrowserPage(QWebPage):
|
|||||||
return super().extension(ext, opt, out)
|
return super().extension(ext, opt, out)
|
||||||
return handler(opt, out)
|
return handler(opt, out)
|
||||||
|
|
||||||
def javaScriptAlert(self, _frame, msg):
|
def javaScriptAlert(self, frame, msg):
|
||||||
"""Override javaScriptAlert to use the statusbar."""
|
"""Override javaScriptAlert to use the statusbar."""
|
||||||
log.js.debug("alert: {}".format(msg))
|
log.js.debug("alert: {}".format(msg))
|
||||||
|
if config.get('ui', 'modal-js-dialog'):
|
||||||
|
return super().javaScriptAlert(frame, msg)
|
||||||
|
|
||||||
if (self._is_shutting_down or
|
if (self._is_shutting_down or
|
||||||
config.get('content', 'ignore-javascript-alert')):
|
config.get('content', 'ignore-javascript-alert')):
|
||||||
return
|
return
|
||||||
self._ask("[js alert] {}".format(msg), usertypes.PromptMode.alert)
|
self._ask("[js alert] {}".format(msg), usertypes.PromptMode.alert)
|
||||||
|
|
||||||
def javaScriptConfirm(self, _frame, msg):
|
def javaScriptConfirm(self, frame, msg):
|
||||||
"""Override javaScriptConfirm to use the statusbar."""
|
"""Override javaScriptConfirm to use the statusbar."""
|
||||||
log.js.debug("confirm: {}".format(msg))
|
log.js.debug("confirm: {}".format(msg))
|
||||||
|
if config.get('ui', 'modal-js-dialog'):
|
||||||
|
return super().javaScriptConfirm(frame, msg)
|
||||||
|
|
||||||
if self._is_shutting_down:
|
if self._is_shutting_down:
|
||||||
return False
|
return False
|
||||||
ans = self._ask("[js confirm] {}".format(msg),
|
ans = self._ask("[js confirm] {}".format(msg),
|
||||||
|
@ -305,6 +305,10 @@ def data(readonly=False):
|
|||||||
SettingValue(typ.Bool(), 'false'),
|
SettingValue(typ.Bool(), 'false'),
|
||||||
"Whether to hide the mouse cursor."),
|
"Whether to hide the mouse cursor."),
|
||||||
|
|
||||||
|
('modal-js-dialog',
|
||||||
|
SettingValue(typ.Bool(), 'false'),
|
||||||
|
"Use standard JavaScript modal dialog for alert() and confirm()"),
|
||||||
|
|
||||||
readonly=readonly
|
readonly=readonly
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user