Hello community,

here is the log from the commit of package vimb for openSUSE:Factory checked in 
at 2020-01-03 17:38:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vimb (Old)
 and      /work/SRC/openSUSE:Factory/.vimb.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vimb"

Fri Jan  3 17:38:46 2020 rev:5 rq:760601 version:3.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/vimb/vimb.changes        2019-08-23 
11:10:05.734455774 +0200
+++ /work/SRC/openSUSE:Factory/.vimb.new.6675/vimb.changes      2020-01-03 
17:39:03.295359438 +0100
@@ -1,0 +2,22 @@
+Fri Jan  3 09:20:46 UTC 2020 - Michael Vetter <mvet...@suse.com>
+
+- Update to 3.6.0:
+  Added:
+  * :cleardata [listOfDataTypes] [timeSpan] command to clear various types of
+    stored website data modified in the last timeSpan.
+  * Setting hint-match-element to allow to disable the hinting to filter hints
+    by the elements text content. This is useful if 'hint-keys' are set the
+    chars instead of numbers.
+  * New autocmd event LoadStarting to run auto commands before the first page
+    content is loaded (Thanks to Patrick Steinhardt).
+  * Setting geolocation with values ('ask', 'always' and 'never') to allow the
+    user to permit or disable geolcation requests by default (Thanks to Alva).
+  * Setting dark-mode to switch the webview into dark mode, which might be
+    picked up by pages media query to setup dark styling (Thanks to Alva).
+  * Option --cmd, -C to run ex commands on startup.
+  Removed:
+  * :clearcache was removed in favor of more advanced :cleardata command.
+    The previous behaviour of :clearcache could be replaces by
+    :cleardata memory-cache,disk-cache.
+
+-------------------------------------------------------------------

Old:
----
  3.5.0.tar.gz

New:
----
  3.6.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vimb.spec ++++++
--- /var/tmp/diff_new_pack.6OQSfs/_old  2020-01-03 17:39:03.687359639 +0100
+++ /var/tmp/diff_new_pack.6OQSfs/_new  2020-01-03 17:39:03.691359642 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package vimb
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           vimb
-Version:        3.5.0
+Version:        3.6.0
 Release:        0
 Summary:        The vim-like browser
 License:        GPL-3.0-or-later

++++++ 3.5.0.tar.gz -> 3.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/.travis.yml new/vimb-3.6.0/.travis.yml
--- old/vimb-3.5.0/.travis.yml  2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/.travis.yml  2020-01-02 23:17:49.000000000 +0100
@@ -3,7 +3,7 @@
     gh-pages
 
 language: c
-dist: xenial
+dist: bionic
 sudo: required
 
 compiler:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/CHANGELOG.md new/vimb-3.6.0/CHANGELOG.md
--- old/vimb-3.5.0/CHANGELOG.md 2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/CHANGELOG.md 2020-01-02 23:17:49.000000000 +0100
@@ -6,10 +6,27 @@
 and this project adheres to [Semantic 
Versioning](http://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+
+## [3.6.0] - 2020-01-02
 ### Added
+* `:cleardata [listOfDataTypes] [timeSpan]` command to clear various types of
+  stored website data modified in the last _timeSpan_.
+* Setting `hint-match-element` to allow to disable the hinting to filter hints
+  by the elements text content. This is useful if 'hint-keys' are set the
+  chars instead of numbers.
+* New autocmd event `LoadStarting` to run auto commands before the first page
+  content is loaded (Thanks to Patrick Steinhardt).
+* Setting `geolocation` with values ('ask', 'always' and 'never') to allow the
+  user to permit or disable geolcation requests by default (Thanks to Alva).
+* Setting `dark-mode` to switch the webview into dark mode, which might be
+  picked up by pages media query to setup dark styling (Thanks to Alva).
+* Option `--cmd, -C` to run ex commands on startup.
 ### Changed
 ### Fixed
 ### Removed
+* `:clearcache` was removed in favor of more advanced `:cleardata` command.
+  The previous behaviour of `:clearcache` could be replaces by
+  `:cleardata memory-cache,disk-cache`.
 
 ## [3.5.0] - 2019-07-29
 ### Added
@@ -256,7 +273,8 @@
   cookie file
 * Fixed none POSIX `echo -n` call
 
-[Unreleased]: https://github.com/fanglingsu/vimb/compare/3.5.0...master
+[Unreleased]: https://github.com/fanglingsu/vimb/compare/3.6.0...master
+[3.6.0]: https://github.com/fanglingsu/vimb/compare/3.5.0...3.6.0
 [3.5.0]: https://github.com/fanglingsu/vimb/compare/3.4.0...3.5.0
 [3.4.0]: https://github.com/fanglingsu/vimb/compare/3.3.0...3.4.0
 [3.3.0]: https://github.com/fanglingsu/vimb/compare/3.2.0...3.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/Makefile new/vimb-3.6.0/Makefile
--- old/vimb-3.5.0/Makefile     2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/Makefile     2020-01-02 23:17:49.000000000 +0100
@@ -1,4 +1,4 @@
-version = 3.5.0
+version = 3.6.0
 include config.mk
 
 all: version.h src.subdir-all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/doc/vimb.1 new/vimb-3.6.0/doc/vimb.1
--- old/vimb-3.5.0/doc/vimb.1   2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/doc/vimb.1   2020-01-02 23:17:49.000000000 +0100
@@ -1,34 +1,41 @@
 .\" vim: ft=groff
-.ss 12 0
-.ad l
 .TH VIMB 1 "DATE" "vimb/VERSION" "Vimb Manual"
-.de EX
-.nf
-.ft CW
-..
-.de EE
-.ft R
-.fi
-..
 .SH NAME
 Vimb - Vim Browser - A modal web browser based on WebKit, inspired by Vim: the
 great editor.
+.
+.
 .SH SYNOPSIS
 .B vimb
 .OP OPTIONS
 .RI [ URI "|" file "|" - ]
+.
+.
 .SH DESCRIPTION
 Vimb is a WebKit based web browser that behaves like the Vimperator
 plugin for Firefox and has usage paradigms from the great editor, Vim.
 The goal of Vimb is to build a completely keyboard-driven, efficient
 and pleasurable browsing-experience.
+.
+.
 .SH OPTIONS
 If no \fIURI\fP or \fIfile\fP is given, Vimb will open the configured
 home-page.
 If \fIURI\fP is '-', Vimb reads the HTML to display from stdin.
-.PP
+.P
 Mandatory arguments to long options are mandatory for short options too.
 .TP
+.BI "\-C, \-\-cmd " "CMD"
+Run \fICMD\fP as ex command line right before the first page is loaded.
+If the flag is used more than one time, the commands are called in order they
+are given.
+You could also pass several ex commands in one \fICMD\fP,
+if they are separated by "|".
+.sp
+.EX
+vimb --cmd "set dark-mode=on|set header=Referer,DNT=1"
+.EE
+.TP
 .BI "\-c, \-\-config " "FILE"
 Use custom configuration given as \fIFILE\fP.
 This will also be applied on new spawned instances.
@@ -56,28 +63,29 @@
 .TP
 .B "\-\-bug-info"
 Prints information about used libraries for bug reports and then quit.
+.
+.
 .SH MODES
 Vimb is modal and has the following main modes:
-.TP
-.B Normal Mode
+.IP "Normal Mode"
 The default mode.
 Pressing Escape always enter normal mode.
-.TP
-.B Input Mode
+.IP "Input Mode"
 Used for editing text elements in a webpage.
-.TP
-.B Command Mode
+.IP "Command Mode"
 Execute `ex` commands from the builtin inputbox (commandline).
-.TP
-.B Pass-Through Mode
+.IP "Pass-Through Mode"
 In Pass-Through mode only the `<Esc>` and `<C-[>` keybindings are interpreted
 by Vimb, all other keystrokes are given to the webview to handle them.
 This allows the use of a website's configured keybindings, that might otherwise
 be swallowed by Vimb.
+.
+.
 .SH NORMAL MODE COMMANDS
 Some of the Normal Model Commands can have a numeric count to multiply the
 effect of the command.
-If a command supports the count this is shown as \fB[N]\fP.
+If a command supports the count this is shown as [\fBN\fP].
+.
 .SS General
 .TP
 .B :
@@ -101,6 +109,7 @@
 .TP
 .B CTRL\-Q
 Quit the browser if there are no running downloads.
+.
 .SS Navigation
 .TP
 .B o
@@ -158,6 +167,7 @@
 .TP
 .B CTRL\-C
 Stop loading the current page.
+.
 .SS Motion
 .TP
 .BI [ N ]CTRL\-F
@@ -210,6 +220,7 @@
 .B ''
 Jumps to the position before the latest jump, or where the last "m'" command
 was given.
+.
 .SS Hinting
 Hinting in Vimb is how you accomplish the tasks that you would do with the
 mouse in common mouse-driven browsers: open a URI, yank a URI, save a page and
@@ -221,32 +232,36 @@
 or any combination of these methods.
 If <enter> is pressed, the current active hint will be fired.
 If only one possible hint remains, this will be fired automatically.
-.PP
-.BI Syntax: " ;{mode}{hint}"
-.PP
+.P
+.BR Syntax: " ;{mode}{hint}"
+.P
 Start Hints mode.
 Different elements depending on \fImode\fP are highlighted and `numbered'.
 Elements can be selected either by typing their label, or by typing part
 of their text (\fIhint\fP) to narrow down the result.
 When an element has been selected, it is automatically clicked
 or used (depending on \fImode\fP) and hint mode ends.
-.PP
+.P
 The filtering of hints by text splits the query at ' ' and use the single parts
 as separate queries to filter the hints.
 This is useful for hints that have a lot of filterable chars in common
 and many chars are required to make a distinct selection.
 For example ';over tw' will easily select the second hint out of
 {'very long link text one', 'very long link text two'}.
-.PP
+.P
 The following keys have special meanings in Hints modes:
 .PD 0
-.IP \fB<CR>\fP
+.TP
+.B <CR>
 Selects the first highlighted element, or the current focused.
-.IP "\fB<Tab>\fP"
+.TP
+.B <Tab>
 Moves the focus to the next hint element.
-.IP "\fB<S-Tab>\fP"
+.TP
+.B <S-Tab>
 Moves the focus to the previous hint element.
-.IP "\fB<Esc>, CTRL\-C, CTRL\-[\fP"
+.TP
+.B <Esc>, CTRL\-C, CTRL\-[
 Exits Hints mode without selecting an element.
 .PD
 .TP
@@ -311,13 +326,14 @@
 .PD
 .RE
 .TP
-.BI Syntax: " g;{mode}{hint}"
+.BR Syntax: " g;{mode}{hint}"
 Start an extended hints mode and stay there until <Esc> is pressed.
 Like normal hinting, except that after a hint is selected, hints
 remain visible so that another one can be selected with the same action
 as the first.
 Note that the extended hint mode can only be combined with the following
-hint modes \fII o p P s t y Y\fP.
+hint modes
+.IR "I o p P s t y Y" .
 .PD
 .TP
 .B Motion
@@ -325,7 +341,7 @@
 Motions commands are like those for normal mode except that CTRL is used as
 modifier.
 But they can not be used together with a count.
-.PP
+.P
 .PD 0
 .TP
 .B CTRL-F
@@ -347,13 +363,14 @@
 Scroll one step up.
 .PD
 .RE
+.
 .SS Searching
 .TP
 .BI / QUERY ", ?" QUERY
 Start searching for \fIQUERY\fP in the current page.
 \fI/\fP start search forward, \fI?\fP in backward direction.
 .TP
-.B *, #
+.BR * , " #"
 Start searching for the current selected text, or if no text is selected for
 the content of the primary or secondary clipboard.
 \fI*\fP start the search in forward direction and \fI#\fP in backward
@@ -372,6 +389,7 @@
 .B <CR>
 Perform a click on element containing the current highlighted search result.
 direction.
+.
 .SS Zooming
 .TP
 .BI [ N ]zi
@@ -388,6 +406,7 @@
 .TP
 .B zz
 Reset Zoom.
+.
 .SS Yank
 .TP
 .BI [ \(dqx ]y
@@ -395,13 +414,15 @@
 .TP
 .BI [ \(dqx ]Y
 Yank the current selection into register x and clipboard.
+.
+.
 .SH COMMAND MODE
 Commands that are listed below are ex-commands like in Vim, that are typed
 into the inputbox (the command line of vimb).
 The commands may vary in their syntax or in the parts they allow,
 but in general they follow a simple syntax.
-.PP
-.BI Syntax: " :[:| ][N]cmd[name][!][ lhs][ rhs]"
+.P
+.BR Syntax: " :[:| ][N]cmd[name][!][ lhs][ rhs]"
 .sp
 Where \fIlhs\fP (left hand side) must not contain any unescaped space.
 The syntax of the rhs (right hand side) if this is available depends on the
@@ -413,7 +434,7 @@
 history and register.
 To avoid this, the commands can be prefixed by one or more additional `:' or
 whitespace.
-.PP
+.P
 Multiple commands, separated by a `|' can be given in a single command line
 and will be executed consecutively.
 The pipe can be included as an argument to a command by escaping it with a
@@ -422,7 +443,7 @@
 Following commands process the entire command-line string literally.
 These commands will include any `|' as part of their argument string and so
 can not be followed by another command.
-.PP
+.P
 .PD 0
 .IP - 2
 autocmd
@@ -437,6 +458,7 @@
 .IP -
 shellcmd
 .PD
+.
 .SS Command Line Editing
 .TP
 .B <Esc>, CTRL\-[, CTRL-C
@@ -466,6 +488,7 @@
 .B CTRL\-R {a-z"%:/;}
 Insert the content of given register at cursor position.
 See also section about `:reg[ister]' command.
+.
 .SS Command Line History
 .TP
 .B <Tab>
@@ -480,6 +503,7 @@
 .B <Down>
 Step forward in the command history.
 Yank the current selection into register \fIx\fP and clipboard.
+.
 .SS Open
 .TP
 .BI ":o[pen] [" URI ]
@@ -489,41 +513,46 @@
 .BI ":t[abopen] [" URI ]
 Open the give \fIURI\fP in a new window.
 If \fIURI\fP is empty, the configured 'home-page' is opened.
+.
 .SS Key Mapping
 Key mappings allow users to alter the actions of key presses.
 Each key mapping is associated with a mode and only has effect
 when the mode is active.
 The following commands allow the user to substitute one sequence
 of key presses by another.
-.PP
-.BI Syntax: " :{m}map {lhs} {rhs}"
-.PP
+.P
+.BR Syntax: " :{m}map {lhs} {rhs}"
+.P
 Note that the \fIlhs\fP ends with the first found space.
 If you want to use space also in the {lhs} you have to escape this
 with a single `\\', as shown in the examples.
 .sp
 The \fIrhs\fP starts with the first non-space char. If you want a \fIrhs\fP
 that starts with a space, you have to use "<Space>".
-.PP
+.P
 Standard key mapping commands are provided for these modes \fIm\fP:
 .PD 0
-.IP \fBn\fP
+.TP
+.B n
 Normal mode: when browsing normally.
-.IP \fBi\fP
+.TP
+.B i
 Insert mode: when interacting with text fields on a website.
-.IP \fBc\fP
+.TP
+.B c
 Command Line mode: when typing into Vimb's command line.
 .PD
-.PP
+.P
 Most keys in key sequences are represented simply by the character that you
 see on the screen when you type them.
 However, as a number of these characters have special meanings, and a
 number of keys have no visual representation, a special notation is required.
-.PP
+.P
 As special key names have the format \fI<...>\fP.
 The following special keys can be used: <Left>, <Up>, <Right>, <Down>
 for the cursor keys, <Tab>, <Esc>, <CR>, <Space>, <BS>, <F1>-<F12> and 
<C-A>-<C-Z>.
 .TP
+.PD 0
 .BI ":nm[ap] {" lhs "} {" rhs }
 .TP
 .BI ":im[ap] {" lhs "} {" rhs }
@@ -534,9 +563,7 @@
 The result, including \fIrhs\fP, is then further scanned for mappings.
 This allows for nested and recursive use of mappings.
 .RS
-.P
-Examples:
-.PD 0
+.sp
 .IP ":cmap <C-G>h /home/user/downloads/"
 Adds a keybind to insert a file path into the input box.
 This could be useful for the `:save' command
@@ -544,9 +571,8 @@
 .IP ":nmap <F1> :set scripts=on<CR>:open !glib<Tab><CR>"
 This will enable scripts and lookup the first bookmarked URI with the tag
 `glib' and open it immediately if F1 key is pressed.
-.IP ":nmap \\\\\ \\\\\  50G"
+.IP ":nmap \e \e  50G"
 Example which maps two spaces to go to 50% of the page.
-.PD
 .RE
 .TP
 .BI ":nn[oremap] {" lhs "} {" rhs }
@@ -565,6 +591,8 @@
 .TP
 .BI ":cu[nmap] {" lhs }
 Remove the mapping of \fIlhs\fP for the applicable mode.
+.PD
+.
 .SS Bookmarks
 .TP
 .BI ":bma [" tags ]
@@ -573,6 +601,7 @@
 .BI ":bmr [" URI ]
 Removes all bookmarks for given \fIURI\fP or, if not given, the current opened
 page.
+.
 .SS Handlers
 Handlers allow specifying external scripts to handle alternative URI methods.
 .TP
@@ -582,7 +611,6 @@
 full URI given when the command is called.
 .RS
 .P
-Examples:
 .PD 0
 .IP ":handler-add mailto=urxvt -e mutt %s"
 to start email client for mailto links.
@@ -595,16 +623,17 @@
 .TP
 .BI ":handler-remove " "handler"
 Remove the handler for the given URI \fIhandler\fP.
+.
 .SS Shortcuts
 Shortcuts allow the opening of an URI built up from a named template with 
additional
 parameters.
 If a shortcut named 'dd' is defined, you can use it with `:open dd
 list of parameters' to open the generated URI.
-.PP
+.P
 Shortcuts are convenient to use with search engines where the URI is 
standardised
 and a single parameter is user defined.
 .TP
-.BI ":shortcut-add " "shortcut" "=" "URI"
+.BI ":shortcut-add " shortcut = URI
 Adds a shortcut with the \fIshortcut\fP and \fIURI\fP template.
 The \fIURI\fP can contain multiple placeholders $0-$9 that will be
 filled by the parameters given when the shortcut is called.
@@ -616,7 +645,6 @@
 `map'.
 .RS
 .P
-Examples:
 .PD 0
 .IP ":shortcut-add dl=https://duckduckgo.com/lite/?q=$0";
 to setup a search engine.
@@ -630,14 +658,15 @@
 .PD
 .RE
 .TP
-.BI ":shortcut-remove " "shortcut"
+.BI ":shortcut-remove " shortcut
 Remove the search engine to the given \fIshortcut\fP.
 .TP
-.BI ":shortcut-default " "shortcut"
+.BI ":shortcut-default " shortcut
 Set the shortcut for given \fIshortcut\fP as the default, that is the shortcut
 to be used if no shortcut is given and the string to open is not an URI. It
 doesn't matter if the \fIshortcut\fP is already in use or not to be able to set
 it.
+.
 .SS Settings
 .TP
 .BI ":se[t] " var = value
@@ -671,6 +700,7 @@
 .TP
 .BI ":se[t] " var !
 Toggle the value of boolean variable \fIvar\fP and display the new set value.
+.
 .SS Queue
 The queue allows the marking of URIs for later reading.
 This list is shared between the single instances of Vimb.
@@ -687,12 +717,13 @@
 .TP
 .B :qc[lear]
 Removes all entries from queue.
+.
 .SS Automatic commands
 An autocommand is a command that is executed automatically in response to some
 event, such as a URI being opened.
 Autocommands are very powerful.
 Use them with care and they will help you avoid typing many commands.
-.PP
+.P
 Autocommands are built with following properties.
 .TP
 .I group
@@ -704,11 +735,15 @@
 .I event
 You can specify a comma separated list of event names.
 No white space can be used in this list.
+.P
 .RS
-.PP
 .PD 0
 Events:
 .TP
+.B LoadStarting
+Fired before a new page is going to be opened.
+No data has been sent or received yet, the load may still fail for transport 
issues.
+.TP
 .B LoadStarted
 Fired if a new page is going to be opened.
 No data has been received yet, the load may still fail for transport issues.
@@ -738,7 +773,7 @@
 applies to the URI associated to an event.
 To use ',' within the single patterns this must be escaped as '\e,'.
 .RS
-.PP
+.P
 .PD 0
 Patterns:
 .IP "\fB*\fP"
@@ -797,7 +832,7 @@
 .TP
 .BI ":aug[roup]! {" name "}"
 Delete the autocmd group \fIname\fP.
-.PP
+.P
 Example:
 .EX
 :aug github
@@ -805,20 +840,108 @@
 :  au LoadCommitted http{s,}://github.com/* set scripts=on
 :aug end
 .EE
+.
 .SS Misc
 .TP
-.B :cl[earcache]
-Clears all resources currently cached by webkit.
+.BI ":cl[eardata] [" dataTypes "] [" timespan "]"
+Asynchronously clears the website data of the given list of \fIdataTypes\fP
+modified in the past \fItimespan\fP.
+Note that the \fIdataTypes\fP must not contain spaces.
+If \fItimespan\fP is not given, all website data will be removed.
 Note that this effects all running instances of vimb.
+.RS
+.P
+.PD 0
+The \fIdataTypes\fP is a comma separated list of following types.
+.TP
+.B memory-cache
+Memory cache.
+.TP
+.B disk-cache
+HTTP disk cache.
+.TP
+.B offline-cache
+Offline web application cache.
+.TP
+.B session-storage
+Session storage data.
+.TP
+.B local-storage
+Local storage data.
+.TP
+.B indexeddb-databases
+IndexedDB databases.
+.TP
+.B plugin-data
+Plugin data.
+.TP
+.B cookies
+Cookies. Note that the cookies are not cleared in case a \fItimespan\fP is
+given.
+.TP
+.B hsts-cache
+HTTP Strict Transport Security cache.
+.TP
+.B -
+Can be used to clear all known data types in case a \fItimespan\fP is used.
+.PD
+.RE
+.RS
+.P
+.PD 0
+The \fItimespan\fP is given as sequence of '[multiplier]\fIunit\fP' tupels
+with following units.
+.TP
+.B y
+year (365 days)
+.TP
+.B w
+week (7 days)
+.TP
+.B d
+day
+.TP
+.B h
+hour
+.TP
+.B m
+minute
+.TP
+.B s
+second
+.PD
+.P
+.I Example:
+.PD 0
+.IP ":cleardata"
+to clear all known website data types without any timespan restriction.
+.IP ":cleardata - 5m"
+to clear all known website data types modified in the last 5 minutes.
+.IP ":cleardata local-storage,session-storage,cookies"
+to completely clear the cookies, local- and session-storage without time
+restrictions.
+.IP ":cleardata disk-cache 2d4h"
+to clear the disk cache that was modified in the past two days and four hours.
+.PD
+.RE
+.TP
+.BI ":sh[ellcmd]! " cmd
+Like :sh[ellcmd] but asynchronous.
+.sp
+Example:
+.EX
+:sh! /bin/sh -c 'echo "`date` $VIMB_URI" >> myhistory.txt'
+.EE
+.TP
 .TP
 .BI ":sh[ellcmd] " cmd
 Runs the given shell \fIcmd\fP syncron and print the output into inputbox.
 The following patterns in \fIcmd\fP are expanded: '~username', '~/', '$VAR'
 and '${VAR}'.
-A '\\' before these patterns disables the expansion.
-.PP
+A '\e' before these patterns disables the expansion.
+.P
 .RS
-.PP
+.P
 .PD 0
 The following environment variables are set for called shell commands.
 .TP
@@ -865,11 +988,11 @@
 .B :reg[ister]
 Display the contents of all registers.
 .RS
-.PP
+.P
 .PD 0
 Registers:
 .TP
-.BR \(dqa " - " \(dqz
+.BR \(dqa " \(em " \(dqz
 26 named registers "a to "z.
 Vimb fills these registers only when you say so.
 .TP
@@ -915,9 +1038,11 @@
 Print current document.
 Open a GUI dialog where you can select the printer,
 number of copies, orientation, etc.
+.
+.
 .SH INPUT MODE
 .TP
-.B <Esc>, CTRL\-[
+.BR <Esc> , " CTRL\-["
 Switch back to normal mode.
 .TP
 .B CTRL\-O
@@ -931,6 +1056,8 @@
 .TP
 .B CTRL\-Z
 Enter the pass-through mode.
+.
+.
 .SH COMPLETIONS
 The completions are triggered by pressing `<Tab>` or `<S-Tab>` in the
 activated inputbox.
@@ -953,13 +1080,9 @@
 The history of URIs is shown for the `:open ` and `:tabopen ` commands.
 This completion looks up every given word in the history URI and titles.
 Only those history items are shown, where the title or URI contains all tags.
-.sp
-Example:
 .RS
-.PD 0
 .IP ":open foo bar<Tab>"
 will complete only URIs that contain the words foo and bar.
-.PD
 .RE
 .TP
 .B bookmarks
@@ -967,17 +1090,13 @@
 only the tags of the bookmarks.
 The bookmark completion is started by `:open \fB!\fP`, `:tabopen \fB!\fP` or
 `:bmr ` and does a prefix search for all given words in the bookmark tags.
-.sp
-Example:
 .RS
-.PD 0
 .IP ":open \fB!\fPfoo ba"
 will match all bookmarks that have tags starting with "foo" and "ba".
 If the bookmark does not have any tags set, the URL is split on `.' and `/'
 into tags.
 .IP ":bmr tag"
 will match all bookmarks that have tags starting with "tag".
-.PD
 .RE
 .TP
 .B bookmark tags
@@ -988,27 +1107,29 @@
 The search completion allows a filtered list of already done searches.
 This completion starts by `/` or `?` in inputbox and performs a prefix
 comparison for further typed chars.
+.
+.
 .SH SETTINGS
 All settings listed below can be set with the `:set' command.
 See \fBSettings\fP under \fBCOMMAND MODE\fP for syntax.
 .TP
-.B accelerated-2d-canvas (bool)
+.BR accelerated-2d-canvas (bool)
 Enable or disable accelerated 2D canvas.
 When accelerated 2D canvas is enabled, WebKit may render some 2D canvas
 content using hardware accelerated drawing operations.
 .TP
-.B allow-file-access-from-file-urls (bool)
+.BR allow-file-access-from-file-urls (bool)
 Indicates whether file access is allowed from file URLs.
 By default, when something is loaded using a file URI, cross origin requests
 to other file resources are not allowed.
 .TP
-.B allow-universal-access-from-file-urls (bool)
+.BR allow-universal-access-from-file-urls (bool)
 Indicates whether or not JavaScript running in the context of a file scheme
 URL should be allowed to access content from any origin.
 By default, when something is loaded in a using a file scheme URL, access to
 the local file system and arbitrary local storage is not allowed.
 .TP
-.B caret (bool)
+.BR caret (bool)
 Whether to enable accessibility enhanced keyboard navigation.
 .TP
 .B cookie-accept (string)
@@ -1033,6 +1154,10 @@
 .B cursiv-font (string)
 The font family used as the default for content using cursive font.
 .TP
+.B dark-mode (bool)
+Whether to enable dark mode. Websites can use the `prefers-color-scheme' media
+query to adjust styles according to this option.
+.TP
 .B default-charset (string)
 The default text charset used when interpreting content with an unspecified
 charset.
@@ -1062,8 +1187,7 @@
 .B $VIMB_DOWNLOAD_PATH
 Setting value of 'download-path' which would be used normally for downloads.
 .PD
-.PP
-Example:
+.P
 .PD 0
 .IP ":set download-command=/bin/sh -c ""cd '$VIMB_DOWNLOAD_PATH' \
 && curl -sLJOC - -e '$VIMB_URI' %s"""
@@ -1103,13 +1227,16 @@
 This setting decides how to enable and disable hardware acceleration.
 .PD 0
 .RS
-.IP - 2
-`ondemand' enables the hardware acceleration when the web contents request it, 
disabling it again when no
-longer needed.
-.IP - 2
-`always' enforce hardware acceleration to be enabled.
-.IP - 2
-`never' disables it completely.
+.TP
+.B ondemand
+enables the hardware acceleration when the web contents request it, disabling
+it again when no longer needed.
+.TP
+.B always
+enforce hardware acceleration to be enabled.
+.TP
+.B never
+disables it completely.
 Note that disabling hardware acceleration might cause some websites to not
 render correctly or consume more CPU.
 .RE
@@ -1135,8 +1262,7 @@
 To use '=' within a header value the value must be quoted like shown in
 Example for the Cookie header.
 .RS
-.PP
-Example:
+.P
 .PD 0
 .IP ":set header=DNT=1,User-Agent,Cookie='name=value'"
 Send the 'Do Not Track' header with each request and remove the User-Agent
@@ -1177,6 +1303,12 @@
 .IP
 "span[vimbhint="label"] {text-transform: uppercase !important;}"
 .TP
+.B hint-match-element (bool)
+If this is set to 'true' typed chars that are not part of the set 'hint-keys'
+are used to filter hinted DOM elements by their text value.
+If 'hint-keys' are set to chars instead of numbers it might be useful to
+disable matching of the elements by 'hint-match-element=false'.
+.TP
 .B history-max-items (int)
 Maximum number of unique items stored in search-, command or URI history.
 If history-max-items is set to 0, the history file will not be changed.
@@ -1219,6 +1351,9 @@
 Whether JavaScript can open popup windows automatically without user
 interaction.
 .TP
+.B geolocation (string)
+Controls website access to the geolocation API {`always', `never', `ask' 
(display a prompt each time)}
+.TP
 .B media-playback-allows-inline (bool)
 Whether media playback is full-screen only or inline playback is allowed.
 Setting it to false allows specifying that media playback should be always
@@ -1278,7 +1413,9 @@
 The font family used as the default for content using serif font.
 .TP
 .B show-titlebar (bool)
-Determines whether the titlebar is shown (on systems that provide window 
decoration). Defaults to true.
+Determines whether the titlebar is shown (on systems that provide window
+decoration).
+Defaults to true.
 .TP
 .B site-specific-quirks (bool)
 Enables the site-specific compatibility workarounds.
@@ -1373,6 +1510,8 @@
 Whether to enable the XSS auditor.
 This feature filters some kinds of reflective XSS attacks on vulnerable web
 sites.
+.
+.
 .SH FILES
 .TP
 .IR $XDG_CONFIG_HOME/vimb[/PROFILE]
@@ -1424,15 +1563,21 @@
 .TP
 There are also some sample scripts installed together with Vimb under
 PREFIX/share/vimb/examples.
+.
+.
 .SH ENVIRONMENT
 .TP
 .B http_proxy, HTTP_PROXY
 If either environment variable is non-empty, the specified host and
 optional port is used to tunnel requests. For example:
 HTTP_PROXY=localhost:8118.
+.
+.
 .SH "REPORTING BUGS"
 Report bugs to the main project page on 
https://github.com/fanglingsu/vimb/issues
 .br
 or on the mailing list https://lists.sourceforge.net/lists/listinfo/vimb-users.
+.
+.
 .SH AUTHOR
 Daniel Carl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/autocmd.c new/vimb-3.6.0/src/autocmd.c
--- old/vimb-3.5.0/src/autocmd.c        2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/autocmd.c        2020-01-02 23:17:49.000000000 +0100
@@ -44,15 +44,16 @@
     const char *name;
     guint      bits;
 } events[] = {
-    {"*",                0x00ff},
-    {"LoadStarted",      0x0001},
-    {"LoadCommitted",    0x0002},
-    /*{"LoadFirstLayout",  0x0004},*/
-    {"LoadFinished",     0x0008},
-    /*{"LoadFailed",       0x0010},*/
-    {"DownloadStarted",  0x0020},
-    {"DownloadFinished", 0x0040},
-    {"DownloadFailed",   0x0080},
+    {"*",                0x01ff},
+    {"LoadStarting",     0x0001},
+    {"LoadStarted",      0x0002},
+    {"LoadCommitted",    0x0004},
+    /*{"LoadFirstLayout",  0x0008},*/
+    {"LoadFinished",     0x0010},
+    /*{"LoadFailed",       0x0020},*/
+    {"DownloadStarted",  0x0040},
+    {"DownloadFinished", 0x0080},
+    {"DownloadFailed",   0x0100},
 };
 
 static GSList *get_group(Client *c, const char *name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/autocmd.h new/vimb-3.6.0/src/autocmd.h
--- old/vimb-3.5.0/src/autocmd.h        2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/autocmd.h        2020-01-02 23:17:49.000000000 +0100
@@ -28,6 +28,7 @@
 /* this values correspond to indices in events[] array in autocmd.c */
 typedef enum {
     AU_ALL,
+    AU_LOAD_STARTING,
     AU_LOAD_STARTED,
     AU_LOAD_COMMITTED,
     /*AU_LOAD_FIRST_LAYOUT,*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/ex.c new/vimb-3.6.0/src/ex.c
--- old/vimb-3.5.0/src/ex.c     2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/ex.c     2020-01-02 23:17:49.000000000 +0100
@@ -42,6 +42,7 @@
 #include "util.h"
 #include "ext-proxy.h"
 #include "autocmd.h"
+#include "util.h"
 
 typedef enum {
 #ifdef FEATURE_AUTOCMD
@@ -52,7 +53,7 @@
     EX_BMR,
     EX_EVAL,
     EX_HARDCOPY,
-    EX_CLEARCACHE,
+    EX_CLEARDATA,
     EX_CMAP,
     EX_CNOREMAP,
     EX_HANDADD,
@@ -138,7 +139,7 @@
 static VbCmdResult ex_bookmark(Client *c, const ExArg *arg);
 static VbCmdResult ex_eval(Client *c, const ExArg *arg);
 static void on_eval_script_finished(GDBusProxy *proxy, GAsyncResult *result, 
Client *c);
-static VbCmdResult ex_clearcache(Client *c, const ExArg *arg);
+static VbCmdResult ex_cleardata(Client *c, const ExArg *arg);
 static VbCmdResult ex_hardcopy(Client *c, const ExArg *arg);
 static void print_failed_cb(WebKitPrintOperation* op, GError *err, Client *c);
 static VbCmdResult ex_map(Client *c, const ExArg *arg);
@@ -179,7 +180,7 @@
     {"cmap",             EX_CMAP,        ex_map,        
EX_FLAG_LHS|EX_FLAG_CMD},
     {"cnoremap",         EX_CNOREMAP,    ex_map,        
EX_FLAG_LHS|EX_FLAG_CMD},
     {"cunmap",           EX_CUNMAP,      ex_unmap,      EX_FLAG_LHS},
-    {"clearcache",       EX_CLEARCACHE,  ex_clearcache, EX_FLAG_NONE},
+    {"cleardata",        EX_CLEARDATA,   ex_cleardata,  
EX_FLAG_LHS|EX_FLAG_RHS},
     {"hardcopy",         EX_HARDCOPY,    ex_hardcopy,   EX_FLAG_NONE},
     {"handler-add",      EX_HANDADD,     ex_handlers,   EX_FLAG_RHS},
     {"handler-remove",   EX_HANDREM,     ex_handlers,   EX_FLAG_RHS},
@@ -853,10 +854,78 @@
     }
 }
 
-static VbCmdResult ex_clearcache(Client *c, const ExArg *arg)
+/**
+ * Clear website data by ':cleardata {dataTypeList} {timespan}'.
+ */
+static VbCmdResult ex_cleardata(Client *c, const ExArg *arg)
 {
-    webkit_web_context_clear_cache(webkit_web_context_get_default());
-    return CMD_SUCCESS;
+    unsigned int data_types = 0;
+    WebKitWebsiteDataManager *manager;
+    VbCmdResult result = CMD_SUCCESS;
+    GTimeSpan timespan = 0;
+
+    /* Parse the left hand side if this is available and not '-' */
+    if (arg->lhs->len && strcmp(arg->lhs->str, "-") != 0) {
+        GString *str;
+        char **types;
+        char *value;
+        unsigned int len, i, t;
+        gboolean found;
+        static const Arg type_map[] = {
+            {WEBKIT_WEBSITE_DATA_MEMORY_CACHE,              "memory-cache"},
+            {WEBKIT_WEBSITE_DATA_DISK_CACHE,                "disk-cache"},
+            {WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE, "offline-cache"},
+            {WEBKIT_WEBSITE_DATA_SESSION_STORAGE,           "session-storage"},
+            {WEBKIT_WEBSITE_DATA_LOCAL_STORAGE,             "local-storage"},
+            {WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES,       
"indexeddb-databases"},
+            {WEBKIT_WEBSITE_DATA_PLUGIN_DATA,               "plugin-data"},
+            {WEBKIT_WEBSITE_DATA_COOKIES,                   "cookies"},
+#if WEBKIT_CHECK_VERSION(2, 26, 0)
+            {WEBKIT_WEBSITE_DATA_HSTS_CACHE,                "hsts-cache"},
+#endif
+            {0, ""},
+        };
+
+        /* Walk through list of data types given as rhs. */
+        types = g_strsplit(arg->rhs->str, ",", -1);
+        len   = g_strv_length(types);
+        str   = g_string_new(NULL);
+
+        /* Loop over given types and collect the type values into bitmap. */
+        for (i = 0; i < len; i++) {
+            value = types[i];
+            found = FALSE;
+            for (t = 0; type_map[t].i; t++) {
+                if (!strcmp(value, type_map[t].s)) {
+                    data_types |= type_map[t].i;
+                    found       = TRUE;
+                    break;
+                }
+            }
+
+            if (!found) {
+                /* collect unknown types to be shown in error message. */
+                g_string_append_printf(str, "%s ", value);
+            }
+        }
+        if (*str->str) {
+            vb_echo(c, MSG_ERROR, TRUE, "unknown data type(s): %s", str->str);
+            result = CMD_ERROR|CMD_KEEPINPUT;
+        }
+        g_string_free(str, TRUE);
+        g_strfreev(types);
+    } else {
+        /* No special type or '-' given - clear all known types. */
+        data_types = WEBKIT_WEBSITE_DATA_ALL;
+    }
+
+    if (arg->rhs->len) {
+        timespan = util_string_to_timespan(arg->rhs->str);
+    }
+    manager = 
webkit_web_context_get_website_data_manager(webkit_web_view_get_context(c->webview));
+    webkit_website_data_manager_clear(manager, data_types, timespan, NULL, 
NULL, NULL);
+
+    return result;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/hints.c new/vimb-3.6.0/src/hints.c
--- old/vimb-3.5.0/src/hints.c  2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/hints.c  2020-01-02 23:17:49.000000000 +0100
@@ -168,9 +168,11 @@
         return;
     }
 
-    jsargs = g_strdup_printf("'%s'", *(input + hints.promptlen) ? input + 
hints.promptlen : "");
-    call_hints_function(c, "filter", jsargs, FALSE);
-    g_free(jsargs);
+    if (GET_BOOL(c, "hint-match-element")) {
+        jsargs = g_strdup_printf("'%s'", *(input + hints.promptlen) ? input + 
hints.promptlen : "");
+        call_hints_function(c, "filter", jsargs, FALSE);
+        g_free(jsargs);
+    }
 }
 
 void hints_focus_next(Client *c, const gboolean back)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/main.c new/vimb-3.6.0/src/main.c
--- old/vimb-3.5.0/src/main.c   2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/main.c   2020-01-02 23:17:49.000000000 +0100
@@ -118,6 +118,8 @@
         WebKitJavascriptResult *res, gpointer data);
 static gboolean profileOptionArgFunc(const gchar *option_name,
         const gchar *value, gpointer data, GError **error);
+static gboolean autocmdOptionArgFunc(const gchar *option_name,
+        const gchar *value, gpointer data, GError **error);
 
 struct Vimb vb;
 
@@ -1029,7 +1031,8 @@
 #endif
         + (vb.incognito ? 1 : 0)
         + (vb.profile ? 2 : 0)
-        + (vb.no_maximize ? 1 : 0),
+        + (vb.no_maximize ? 1 : 0)
+        + g_slist_length(vb.cmdargs) * 2,
         sizeof(char *)
     );
 
@@ -1057,6 +1060,10 @@
     if (vb.no_maximize) {
         cmd[i++] = "--no-maximize";
     }
+    for (GSList *l = vb.cmdargs; l; l = l->next) {
+        cmd[i++] = "-C";
+        cmd[i++] = l->data;
+    }
     cmd[i++] = (char*)uri;
     cmd[i++] = NULL;
 
@@ -1374,6 +1381,10 @@
         webkit_policy_decision_ignore(dec);
         spawn_new_instance(uri);
     } else {
+#ifdef FEATURE_AUTOCMD
+        if (strcmp(uri, "about:blank"))
+            autocmd_run(c, AU_LOAD_STARTING, uri, NULL);
+#endif
         webkit_policy_decision_use(dec);
     }
 }
@@ -1782,6 +1793,8 @@
         }
     }
     g_free(vb.profile);
+
+    g_slist_free_full(vb.cmdargs, g_free);
 }
 #endif
 
@@ -2008,7 +2021,16 @@
     char *msg = NULL;
 
     if (WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST(request)) {
-        msg = "request your location";
+        char* geolocation_setting = GET_CHAR(c, "geolocation");
+        if (strcmp(geolocation_setting, "ask") == 0) {
+            msg = "access your location";
+        } else if (strcmp(geolocation_setting, "always") == 0) {
+            webkit_permission_request_allow(request);
+            return TRUE;
+        } else if (strcmp(geolocation_setting, "never") == 0) {
+            webkit_permission_request_deny(request);
+            return TRUE;
+        }
     } else if (WEBKIT_IS_USER_MEDIA_PERMISSION_REQUEST(request)) {
         if 
(webkit_user_media_permission_is_for_audio_device(WEBKIT_USER_MEDIA_PERMISSION_REQUEST(request)))
 {
             msg = "access the microphone";
@@ -2072,6 +2094,13 @@
     return TRUE;
 }
 
+static gboolean autocmdOptionArgFunc(const gchar *option_name,
+        const gchar *value, gpointer data, GError **error)
+{
+    vb.cmdargs = g_slist_append(vb.cmdargs, g_strdup(value));
+    return TRUE;
+}
+
 int main(int argc, char* argv[])
 {
     Client *c;
@@ -2080,6 +2109,7 @@
     gboolean ver = FALSE, buginfo = FALSE;
 
     GOptionEntry opts[] = {
+        {"cmd", 'C', 0, G_OPTION_ARG_CALLBACK, 
(GOptionArgFunc*)autocmdOptionArgFunc, "Ex command run before first page is 
loaded", NULL},
         {"config", 'c', 0, G_OPTION_ARG_FILENAME, &vb.configfile, "Custom 
configuration file", NULL},
         {"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window 
specified by xid", NULL},
         {"incognito", 'i', 0, G_OPTION_ARG_NONE, &vb.incognito, "Run with user 
data read-only", NULL},
@@ -2151,6 +2181,11 @@
 
     c = client_new(NULL);
     client_show(NULL, c);
+
+    /* process the --cmd if this was given */
+    for (GSList *l = vb.cmdargs; l; l = l->next) {
+        ex_run_string(c, l->data, false);
+    }
     if (argc <= 1) {
         vb_load_uri(c, &(Arg){TARGET_CURRENT, NULL});
     } else if (!strcmp(argv[argc - 1], "-")) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/main.h new/vimb-3.6.0/src/main.h
--- old/vimb-3.5.0/src/main.h   2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/main.h   2020-01-02 23:17:49.000000000 +0100
@@ -277,6 +277,7 @@
     char        *files[FILES_LAST];
     FileStorage *storage[STORAGE_LAST];
     char        *profile;           /* profile name */
+    GSList      *cmdargs;           /* ex commands given asl --command, -C 
option */
     struct {
         guint   history_max;
         guint   closed_max;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/setting.c new/vimb-3.6.0/src/setting.c
--- old/vimb-3.5.0/src/setting.c        2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/setting.c        2020-01-02 23:17:49.000000000 +0100
@@ -51,8 +51,10 @@
 static void setting_free(Setting *s);
 
 static int cookie_accept(Client *c, const char *name, DataType type, void 
*value, void *data);
+static int dark_mode(Client *c, const char *name, DataType type, void *value, 
void *data);
 static int default_zoom(Client *c, const char *name, DataType type, void 
*value, void *data);
 static int fullscreen(Client *c, const char *name, DataType type, void *value, 
void *data);
+static int geolocation(Client *c, const char *name, DataType type, void 
*value, void *data);
 static int gui_style(Client *c, const char *name, DataType type, void *value, 
void *data);
 static int hardware_acceleration_policy(Client *c, const char *name, DataType 
type, void *value, void *data);
 static int input_autohide(Client *c, const char *name, DataType type, void 
*value, void *data);
@@ -84,12 +86,14 @@
     setting_add(c, "allow-universal-access-from-file-urls", TYPE_BOOLEAN, 
&off, webkit, 0, "allow-universal-access-from-file-urls");
     setting_add(c, "caret", TYPE_BOOLEAN, &off, webkit, 0, 
"enable-caret-browsing");
     setting_add(c, "cursiv-font", TYPE_CHAR, &"serif", webkit, 0, 
"cursive-font-family");
+    setting_add(c, "dark-mode", TYPE_BOOLEAN, &off, dark_mode, 0, NULL);
     setting_add(c, "default-charset", TYPE_CHAR, &"utf-8", webkit, 0, 
"default-charset");
     setting_add(c, "default-font", TYPE_CHAR, &"sans-serif", webkit, 0, 
"default-font-family");
     setting_add(c, "dns-prefetching", TYPE_BOOLEAN, &on, webkit, 0, 
"enable-dns-prefetching");
     i = SETTING_DEFAULT_FONT_SIZE;
     setting_add(c, "font-size", TYPE_INTEGER, &i, webkit, 0, 
"default-font-size");
     setting_add(c, "frame-flattening", TYPE_BOOLEAN, &off, webkit, 0, 
"enable-frame-flattening");
+    setting_add(c, "geolocation", TYPE_CHAR, &"ask", geolocation, FLAG_NODUP, 
NULL);
     setting_add(c, "hardware-acceleration-policy", TYPE_CHAR, &"ondemand", 
hardware_acceleration_policy, FLAG_NODUP, NULL);
     setting_add(c, "header", TYPE_CHAR, &"", headers, FLAG_LIST|FLAG_NODUP, 
"header");
     i = 1000;
@@ -97,6 +101,7 @@
     setting_add(c, "hint-keys", TYPE_CHAR, &"0123456789", NULL, 0, NULL);
     setting_add(c, "hint-follow-last", TYPE_BOOLEAN, &on, NULL, 0, NULL);
     setting_add(c, "hint-keys-same-length", TYPE_BOOLEAN, &off, NULL, 0, NULL);
+    setting_add(c, "hint-match-element", TYPE_BOOLEAN, &on, NULL, 0, NULL);
     setting_add(c, "html5-database", TYPE_BOOLEAN, &on, webkit, 0, 
"enable-html5-database");
     setting_add(c, "html5-local-storage", TYPE_BOOLEAN, &on, webkit, 0, 
"enable-html5-local-storage");
     setting_add(c, "hyperlink-auditing", TYPE_BOOLEAN, &off, webkit, 0, 
"enable-hyperlink-auditing");
@@ -516,6 +521,13 @@
     return CMD_SUCCESS;
 }
 
+static int dark_mode(Client *c, const char *name, DataType type, void *value, 
void *data)
+{
+    g_object_set(gtk_widget_get_settings(GTK_WIDGET(c->window)), 
"gtk-application-prefer-dark-theme", *(gboolean*)value, NULL);
+
+    return CMD_SUCCESS;
+}
+
 static int default_zoom(Client *c, const char *name, DataType type, void 
*value, void *data)
 {
     /* Store the percent value in the client config. */
@@ -539,6 +551,16 @@
     return CMD_SUCCESS;
 }
 
+static int geolocation(Client *c, const char *name, DataType type, void 
*value, void *data)
+{
+    char *policy = (char *)value;
+    if (strcmp("always", policy) != 0 && strcmp("ask", policy) != 0 && 
strcmp("never", policy) != 0) {
+        vb_echo(c, MSG_ERROR, FALSE, "%s must be in [always, ask, never]", 
name);
+        return CMD_ERROR | CMD_KEEPINPUT;
+    }
+    return CMD_SUCCESS;
+}
+
 /* This needs to be called before the window is shown for the best chance of
  * success, but it may be called at any time.
  * Currently the setting file is read after the window has been shown, which
@@ -684,7 +706,7 @@
             webkit_user_style_sheet_unref(style);
             g_free(source);
         } else {
-            g_message("Could not reed style file: %s", 
vb.files[FILES_USER_STYLE]);
+            g_message("Could not read style file: %s", 
vb.files[FILES_USER_STYLE]);
         }
     } else {
         webkit_user_content_manager_remove_all_style_sheets(ucm);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/util.c new/vimb-3.6.0/src/util.c
--- old/vimb-3.5.0/src/util.c   2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/util.c   2020-01-02 23:17:49.000000000 +0100
@@ -1110,3 +1110,39 @@
     }
 }
 
+/**
+ * Get the time span to given string like '1y5dh' (one year and five days and
+ * one hour).
+ */
+GTimeSpan util_string_to_timespan(const char *input)
+{
+    unsigned int multiplier = 0;
+    GTimeSpan sum           = 0;
+    gboolean hasmultiplier  = FALSE;
+
+    while (*input) {
+        if (VB_IS_DIGIT(*input)) {
+            multiplier    = multiplier * 10 + (*input - '0');
+            /* Use separate variable to differentiate between no multiplier
+             * set (is same as 1) or ultiplier of '0'. */
+            hasmultiplier = TRUE;
+        } else {
+            GTimeSpan s = 0;
+            switch (*input) {
+                case 'y': s = 365 * G_TIME_SPAN_DAY; break;
+                case 'w': s = 7 * G_TIME_SPAN_DAY; break;
+                case 'd': s = G_TIME_SPAN_DAY; break;
+                case 'h': s = G_TIME_SPAN_HOUR; break;
+                case 'm': s = G_TIME_SPAN_MINUTE; break;
+                case 's': s = G_TIME_SPAN_SECOND; break;
+            }
+            sum += s * (hasmultiplier ? multiplier : 1);
+            /* Unset multiplier for th epossible next multiplier in input */
+            multiplier    = 0;
+            hasmultiplier = FALSE;
+        }
+        input++;
+    }
+
+    return sum;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/src/util.h new/vimb-3.6.0/src/util.h
--- old/vimb-3.5.0/src/util.h   2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/src/util.h   2020-01-02 23:17:49.000000000 +0100
@@ -58,5 +58,6 @@
 char *util_str_replace(const char* search, const char* replace, const char* 
string);
 char *util_strescape(const char *source, const char *exceptions);
 gboolean util_wildmatch(const char *pattern, const char *subject);
+GTimeSpan util_string_to_timespan(const char *input);
 
 #endif /* end of include guard: _UTIL_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vimb-3.5.0/tests/test-util.c 
new/vimb-3.6.0/tests/test-util.c
--- old/vimb-3.5.0/tests/test-util.c    2019-07-29 22:03:20.000000000 +0200
+++ new/vimb-3.6.0/tests/test-util.c    2020-01-02 23:17:49.000000000 +0100
@@ -298,6 +298,32 @@
     }
 }
 
+static void test_string_to_timespan(void)
+{
+    g_assert_cmpuint(util_string_to_timespan("d"), ==, G_TIME_SPAN_DAY);
+    g_assert_cmpuint(util_string_to_timespan("h"), ==, G_TIME_SPAN_HOUR);
+    g_assert_cmpuint(util_string_to_timespan("m"), ==, G_TIME_SPAN_MINUTE);
+    g_assert_cmpuint(util_string_to_timespan("s"), ==, G_TIME_SPAN_SECOND);
+
+    g_assert_cmpuint(util_string_to_timespan("y"), ==, G_TIME_SPAN_DAY * 365);
+    g_assert_cmpuint(util_string_to_timespan("w"), ==, G_TIME_SPAN_DAY * 7);
+
+    /* use counters */
+    g_assert_cmpuint(util_string_to_timespan("1s"), ==, G_TIME_SPAN_SECOND);
+    g_assert_cmpuint(util_string_to_timespan("2s"), ==, 2 * 
G_TIME_SPAN_SECOND);
+    g_assert_cmpuint(util_string_to_timespan("34s"), ==, 34 * 
G_TIME_SPAN_SECOND);
+    g_assert_cmpuint(util_string_to_timespan("0s"), ==, 0);
+
+    /* combine counters and different units */
+    g_assert_cmpuint(util_string_to_timespan("ds"), ==, G_TIME_SPAN_DAY + 
G_TIME_SPAN_SECOND);
+    g_assert_cmpuint(util_string_to_timespan("2dh0s"), ==, (2 * 
G_TIME_SPAN_DAY) + G_TIME_SPAN_HOUR);
+
+    /* unparsabel values */
+    g_assert_cmpuint(util_string_to_timespan(""), ==, 0);
+    g_assert_cmpuint(util_string_to_timespan("-"), ==, 0);
+    g_assert_cmpuint(util_string_to_timespan("5-"), ==, 0);
+}
+
 int main(int argc, char *argv[])
 {
     g_test_init(&argc, &argv, NULL);
@@ -316,6 +342,7 @@
     g_test_add_func("/test-util/wildmatch-complete", test_wildmatch_complete);
     g_test_add_func("/test-util/wildmatch-multi", test_wildmatch_multi);
     g_test_add_func("/test-util/strescape", test_strescape);
+    g_test_add_func("/test-util/string_to_timespan", test_string_to_timespan);
 
     return g_test_run();
 }


Reply via email to