Generalized params

Former-commit-id: 53a9bda48c4f5701c71e31abb61f3080fe9e77cb [formerly 0ca5079b30855706871837a725314869949160a0]
Former-commit-id: 0f8c40d4c631c78a21285d21dca754e8f6699d8c
This commit is contained in:
Jaifroid 2017-08-25 11:03:30 +01:00
parent ad8a4bd493
commit a823b04bba

View File

@ -23,8 +23,8 @@
'use strict';
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
var results = params['results'] || 15; //Number of search results to display
params['relativeFontSize'] = ~~(getCookie('relativeFontSize') || "100");
params['results'] = params['results'] || 15; //Number of search results to display
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['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:
@ -78,7 +78,7 @@ function getCookie(cname) {
require.config({
baseUrl: 'js/lib',
config: { '../app': { results: results, params: params } },
config: { '../app': { params: params } },
paths: {
'jquery': 'jquery-3.2.1.slim',
//'bootstrap': 'bootstrap'