Skip to content

Commit

Permalink
Clean up some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Dec 13, 2020
1 parent 282ef47 commit 83709c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys
params['appTheme'] = settingsStore.getItem('appTheme') || 'light'; // Currently implemented: light|dark|dark_invert|dark_mwInvert
document.getElementById('appThemeSelect').value = params.appTheme;
uiUtil.applyAppTheme(params.appTheme);
// A setting that determines whether right-click or long-press of a ZIM link opens a new window/tab
// A setting that determines whether right-click/long-press of a ZIM link opens a new window/tab
params['rightClickOpensTab'] = settingsStore.getItem('rightClickOpensTab') === 'true';
document.getElementById('rightClickOpensTabCheck').checked = params.rightClickOpensTab;

Expand Down Expand Up @@ -719,8 +719,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys
var title = event.state.title;
var titleSearch = event.state.titleSearch;
appstate.target = event.target.kiwixType;
// Select the correct window to which to write the popped history
// in case user siwtches to a tab and navigates history without first clicking on a link
// Select the correct window to which to write the popped history in case the user
// siwtches to a tab and navigates history without first clicking on a link
if (appstate.target === 'window') articleContainer = event.target;
$('#prefix').val("");
$("#welcomeText").hide();
Expand Down Expand Up @@ -1335,8 +1335,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys
insertMediaBlobsJQuery();
};

// We only need to set the articleContainer if we are targeting the iframe, because it will already be set
// in the click event of a ZIM anchor if the user ctrl-clicked a link (see parseAnchorsJQuery() below)
// For articles loaded in the iframe, we need to set the articleContainer (if the user is opening a new tab/window,
// then the articleContainer has already been set in the click event of the ZIM link)
if (appstate.target === 'iframe') {
// Tell jQuery we're removing the iframe document: clears jQuery cache and prevents memory leaks [kiwix-js #361]
$('#articleContent').contents().remove();
Expand Down Expand Up @@ -1654,7 +1654,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys
stateLabel = "Wikipedia search : " + titleSearch;
}
else return;
// Edge Legacy and IE cannot push history to another window/tab and produce an exception
// Edge Legacy and IE cannot push history state to another window/tab and produce an exception;
// independent navigation is therefore disabled for these browsers
try {
targetWin.history.pushState(stateObj, stateLabel, urlParameters);
Expand Down

0 comments on commit 83709c0

Please sign in to comment.