From 468a00b21da681e4a555a831923a1a735dd519f4 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Sat, 4 Nov 2017 14:35:50 +0200 Subject: [PATCH] folding optional --- config.js | 1 + index.html | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 9e315b3..fdbdad2 100644 --- a/config.js +++ b/config.js @@ -4,3 +4,4 @@ config.narrow=500; // less than N pixels window results in single column config.title="MDLinks"; config.favicon=null; // link to favicon config.css=null; // link to style file +config.foldCategories=true; // in single column mode (< narrow width) fold out-of-screen categories diff --git a/index.html b/index.html index 02a3374..39424db 100644 --- a/index.html +++ b/index.html @@ -358,6 +358,7 @@ function filter_cookies(cookies,name) { } function fold_content(name) { if (!narrow_window()) { return } + if (!config.foldCategories) { return } var title = document.getElementById("head_"+name); var el = document.getElementById("content_"+name); el.hidden = ! el.hidden; @@ -365,6 +366,7 @@ function fold_content(name) { } function fold_initial() { if (!narrow_window()) { return } + if (!config.foldCategories) { return } var slides = document.getElementsByClassName("head"); for(var i = 0; i < slides.length; i++) { var el = slides.item(i); @@ -395,7 +397,8 @@ var config = { style:null, // file to load css from favicon:null, // link to favicon file narrow:600, // pixel width that is narrow screen = single column table - arrows:['📙','📚'] // Arrow characters for in/out tab icon + arrows:['📙','📚'], // Arrow characters for in/out tab icon + foldCategories:true // fold categories in single column mode };