Skip to content

Commit

Permalink
Remove remember last pages checkbox and controls
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Aug 29, 2019
1 parent e09b0dd commit 8152392
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
11 changes: 2 additions & 9 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ <h3>Display settings</h3>

<div class="container">
<div class="row">
<h3>Performance and privacy settings</h3>
<h3>Performance settings</h3>
<div class="column">
<div class="panel" id="cacheSettingsDiv">
<div class="panel-heading">Speed up archive access</div>
Expand All @@ -260,13 +260,6 @@ <h3>Performance and privacy settings</h3>
</div>
</div>
<div class="col-sm-6">
<div class="checkbox">
<label>
<input type="checkbox" name="rememberLastVisitedPage" value="true" id="rememberLastVisitedPageCheck" checked>
<strong>Return to last visited page when you open an archive</strong>
<p>You will still need to pick the archive</p>
</label>
</div>
<div id="cacheStatusPanel" class="panel panel-footer" style="overflow: hidden">
<div><p><b>Cache status:</b></p></div>
<div id="cacheStatus"></div>
Expand All @@ -282,7 +275,7 @@ <h3>Performance and privacy settings</h3>

<div class="container">
<div class="row">
<h3>Expert Settings</h3>
<h3>Expert settings</h3>
<div class="column">
<div class="panel panel-danger" id="contentInjectionModeDiv">
<div class="panel-heading">Content injection mode</div>
Expand Down
12 changes: 0 additions & 12 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,6 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
});
}
});
document.getElementById('rememberLastVisitedPageCheck').addEventListener('change', function(e) {
var rememberLastPage = e.target.checked ? true : false;
cookies.setItem('rememberLastPage', rememberLastPage, Infinity);
if (!rememberLastPage) {
cache.clear('lastpages', refreshCacheStatus);
} else {
refreshCacheStatus();
}
});


/**
* Displays or refreshes the API status shown to the user
Expand Down Expand Up @@ -398,8 +388,6 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
// Clear count of deleted assets
document.getElementById('clearCacheResult').innerHTML = '';
// Update radio buttons and checkbox
params.rememberLastPage = true;
document.getElementById('rememberLastVisitedPageCheck').checked = params.rememberLastPage;
document.getElementById('cachedAssetsModeRadio' + (params.useCache ? 'True' : 'False')).checked = true;
// Send a message to Service Worker to turn caching on or off
if (contentInjectionMode === 'serviceworker')
Expand Down

0 comments on commit 8152392

Please sign in to comment.