Clarify history_session_interval and rename it to _gap_interval
"session" is already overloaded enough.
This commit is contained in:
parent
8712fc6fd3
commit
d7036fe8a8
@ -284,7 +284,7 @@ def qute_history(url):
|
||||
return 'text/html', jinja.render(
|
||||
'history.html',
|
||||
title='History',
|
||||
session_interval=config.val.history_session_interval
|
||||
gap_interval=config.val.history_gap_interval
|
||||
)
|
||||
else:
|
||||
# Get current date from query parameter, if not given choose today.
|
||||
|
@ -20,11 +20,15 @@ confirm_quit:
|
||||
default: [never]
|
||||
desc: Whether to confirm quitting the application.
|
||||
|
||||
history_session_interval:
|
||||
history_gap_interval:
|
||||
type: Int
|
||||
default: 30
|
||||
desc: The maximum time in minutes between two history items for them to be considered
|
||||
being from the same session. Use -1 to disable separation.
|
||||
desc: >-
|
||||
The maximum time in minutes between two history items for them to be
|
||||
considered being from the same browsing session.
|
||||
|
||||
Items with less time between them are grouped when being displayed in `:history`.
|
||||
Use -1 to disable separation.
|
||||
|
||||
ignore_case:
|
||||
type:
|
||||
|
@ -54,7 +54,7 @@ table {
|
||||
<a href="#" id="load" style="display: none">Show more</a>
|
||||
<script type="text/javascript" src="qute://javascript/history.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.SESSION_INTERVAL = {{session_interval}} * 60 * 1000;
|
||||
window.GAP_INTERVAL = {{gap_interval}} * 60 * 1000;
|
||||
|
||||
window.onload = function() {
|
||||
var loadLink = document.getElementById('load');
|
||||
|
@ -75,9 +75,9 @@ window.loadHistory = (function() {
|
||||
|
||||
// Create session-separator and new tbody if necessary
|
||||
if (tbody.lastChild !== null && lastItemDate !== null &&
|
||||
window.SESSION_INTERVAL > 0) {
|
||||
window.GAP_INTERVAL > 0) {
|
||||
var interval = lastItemDate.getTime() - date.getTime();
|
||||
if (interval > window.SESSION_INTERVAL) {
|
||||
if (interval > window.GAP_INTERVAL) {
|
||||
// Add session-separator
|
||||
var sessionSeparator = document.createElement("td");
|
||||
sessionSeparator.className = "session-separator";
|
||||
|
Loading…
Reference in New Issue
Block a user