From a823b04bba6df823cc71bc6139d5f7fe9e43cc95 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Fri, 25 Aug 2017 11:03:30 +0100 Subject: [PATCH] Generalized params Former-commit-id: 53a9bda48c4f5701c71e31abb61f3080fe9e77cb [formerly 0ca5079b30855706871837a725314869949160a0] Former-commit-id: 0f8c40d4c631c78a21285d21dca754e8f6699d8c --- www/js/init.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/js/init.js b/www/js/init.js index f89a53c3..155d386c 100644 --- a/www/js/init.js +++ b/www/js/init.js @@ -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'