mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-10 04:40:27 -04:00
Generalized params
Former-commit-id: 53a9bda48c4f5701c71e31abb61f3080fe9e77cb [formerly 0ca5079b30855706871837a725314869949160a0] Former-commit-id: 0f8c40d4c631c78a21285d21dca754e8f6699d8c
This commit is contained in:
parent
ad8a4bd493
commit
a823b04bba
@ -23,8 +23,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var params = {};
|
var params = {};
|
||||||
params['version'] = "0.8.2 Beta"; //DEV: do not set this dynamically -- it is compared to the cookie "version" in order to show first-time info, and the cookie is updated in app.js
|
params['version'] = "0.8.2 Beta"; //DEV: do not set this dynamically -- it is compared to the cookie "version" in order to show first-time info, and the cookie is updated in app.js
|
||||||
var results = params['results'] || 15; //Number of search results to display
|
params['results'] = params['results'] || 15; //Number of search results to display
|
||||||
params['relativeFontSize'] = ~~(getCookie('relativeFontSize') || "100");
|
params['relativeFontSize'] = ~~(getCookie('relativeFontSize') || "100"); //Sets the initial font size for articles (as a percentage) - user can adjust using zoom buttons
|
||||||
params['cssSource'] = getCookie('cssSource') || "auto"; //Set default to "auto", "desktop" or "mobile"
|
params['cssSource'] = getCookie('cssSource') || "auto"; //Set default to "auto", "desktop" or "mobile"
|
||||||
params['cssCache'] = getCookie('cssCache') || true; //Set default to true to use cached CSS, false to use Zim only
|
params['cssCache'] = getCookie('cssCache') || true; //Set default to true to use cached CSS, false to use Zim only
|
||||||
//Convert string values of true / false to Boolean without disturbing any Boolean already set:
|
//Convert string values of true / false to Boolean without disturbing any Boolean already set:
|
||||||
@ -78,7 +78,7 @@ function getCookie(cname) {
|
|||||||
|
|
||||||
require.config({
|
require.config({
|
||||||
baseUrl: 'js/lib',
|
baseUrl: 'js/lib',
|
||||||
config: { '../app': { results: results, params: params } },
|
config: { '../app': { params: params } },
|
||||||
paths: {
|
paths: {
|
||||||
'jquery': 'jquery-3.2.1.slim',
|
'jquery': 'jquery-3.2.1.slim',
|
||||||
//'bootstrap': 'bootstrap'
|
//'bootstrap': 'bootstrap'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user