Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

fix: variable s gets reset to 0 (closes #4295, per #4065) #4296

Merged
merged 2 commits into from
Jun 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*/
private static final String CLEAR_VISITED_CSS =
"var nSheets = document.styleSheets.length;" +
"for (s=0; s < nSheets; s++) {" +
"for (let s=0; s < nSheets; s++) {" +
" var stylesheet = document.styleSheets[s];" +
" var nRules = stylesheet.cssRules ? stylesheet.cssRules.length : 0;" +
// rules need to be removed by index. That modifies the whole list - it's easiest
Expand Down Expand Up @@ -97,7 +97,7 @@ public void onLoadResource(WebView view, String url) {
// Add an onLoad() listener so that we run the cleanup script every time
// a <link>'d css stylesheet is loaded:
"var links = document.getElementsByTagName('link');" +
"for (i = 0; i < links.length; i++) {" +
"for (let i = 0; i < links.length; i++) {" +
" link = links[i];" +
" if (link.rel == 'stylesheet') {" +
" link.addEventListener('load', cleanupVisited, false);" +
Expand Down