diff --git a/static/skin/index.js b/static/skin/index.js
index 90807e07c..6c90d8b71 100644
--- a/static/skin/index.js
+++ b/static/skin/index.js
@@ -16,6 +16,8 @@
let noResultInjected = false;
let filters = getCookie(filterCookieName);
let params = new URLSearchParams(window.location.search || filters || '');
+ let noFilter = params.has('nofilter') && params.get('nofilter');
+ let inIframe = false;
let timer;
function queryUrlBuilder() {
@@ -101,7 +103,7 @@
${description}
${language.substr(0, 2).toUpperCase()}
- Preview${downloadLink ? ` |
Download` : ''}
`;
+ ${!inIframe ? `
Preview` : ''}${downloadLink ? `${!inIframe ? ' | ' : ''}
Download` : ''}
`;
return divTag;
}
@@ -336,6 +338,14 @@
window.addEventListener('scroll', loadSubset);
window.onload = async () => {
+ if (noFilter) {
+ document.getElementById('kiwixNav').remove();
+ }
+ if (window.location !== window.parent.location) {
+ document.getElementById('kiwixFooter').innerHTML = '';
+ document.getElementById('kiwixHomeBody').style.padding = '20px';
+ inIframe = true;
+ }
iso = new Isotope( '.book__list', {
itemSelector: '.book',
getSortData:{
@@ -351,7 +361,7 @@
rowHeight: '.book'
}
});
- footer = document.getElementById('kiwixfooter');
+ footer = document.getElementById('kiwixFooter');
fadeOutDiv = document.getElementById('fadeOut');
loader = document.querySelector('.loader');
await loadAndDisplayBooks();
@@ -365,7 +375,7 @@
}
params.forEach((value, key) => {document.getElementsByName(key)[0].value = value});
document.getElementById('kiwixSearchForm').onsubmit = (event) => {event.preventDefault()};
- if (!window.location.search) {
+ if (!window.location.search && !inIframe) {
const browserLang = navigator.language.split('-')[0];
const langFilter = document.getElementById('languageFilter');
langFilter.value = browserLang.length === 3 ? browserLang : iso6391To3[browserLang];
diff --git a/static/templates/index.html b/static/templates/index.html
index c6f05aa42..a5ca66774 100644
--- a/static/templates/index.html
+++ b/static/templates/index.html
@@ -45,7 +45,7 @@
-