This commit is contained in:
Florian Bruhin 2017-02-11 17:22:35 +01:00
parent 9c712929f5
commit 66cbb8aa31
2 changed files with 5 additions and 5 deletions

View File

@ -1408,10 +1408,9 @@ class CommandDispatcher:
tab.dump_async(callback, plain=plain) tab.dump_async(callback, plain=plain)
@cmdutils.register(instance='command-dispatcher', name='history', @cmdutils.register(instance='command-dispatcher', scope='window')
scope='window') def history(self, tab=True, bg=False, window=False):
def show_history(self, tab=True, bg=False, window=False): """Show browsing history.
r"""Show browsing history
Args: Args:
tab: Open in a new tab. tab: Open in a new tab.

View File

@ -163,7 +163,7 @@ def qute_bookmarks(_url):
return 'text/html', html return 'text/html', html
@add_handler('history') @add_handler('history') # noqa
def qute_history(url): def qute_history(url):
"""Handler for qute:history. Display history.""" """Handler for qute:history. Display history."""
# Get current date from query parameter, if not given choose today. # Get current date from query parameter, if not given choose today.
@ -181,6 +181,7 @@ def qute_history(url):
prev_date = curr_date - one_day prev_date = curr_date - one_day
def history_iter(reverse): def history_iter(reverse):
"""Iterate through the history and get the items we're interested in."""
curr_timestamp = time.mktime(curr_date.timetuple()) curr_timestamp = time.mktime(curr_date.timetuple())
history = objreg.get('web-history').history_dict.values() history = objreg.get('web-history').history_dict.values()
if reverse: if reverse: