From 710ca246f23e75b2b8709e06200833dcf7a0fc53 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 8 May 2019 21:19:48 -0600 Subject: [PATCH] Update labs settings --- resources/views/settings/labs.blade.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/resources/views/settings/labs.blade.php b/resources/views/settings/labs.blade.php index 2dba9590e..aaa5316cf 100644 --- a/resources/views/settings/labs.blade.php +++ b/resources/views/settings/labs.blade.php @@ -172,6 +172,11 @@

Collapses captions/comments more than 3 lines.

+
+ + +

An experimental content-first timeline layout

+

Discovery


@@ -199,6 +204,7 @@ $(document).ready(function() { let showSuggestions = localStorage.getItem('pf_metro_ui.exp.rec') == 'false' ? false : true; let showReadMore = localStorage.getItem('pf_metro_ui.exp.rm') == 'false' ? false : true; + let distractionFree = localStorage.getItem('pf_metro_ui.exp.df') == 'true' ? true : false; if(showSuggestions == true) { $('#show_suggestions').attr('checked', true); @@ -208,6 +214,10 @@ $(document).ready(function() { $('#show_readmore').attr('checked', true); } + if(distractionFree == true) { + $('#distraction_free').attr('checked', true); + } + $('#show_suggestions').on('change', function(e) { if(e.target.checked) { localStorage.removeItem('pf_metro_ui.exp.rec'); @@ -223,6 +233,14 @@ $(document).ready(function() { localStorage.setItem('pf_metro_ui.exp.rm', false); } }); + + $('#distraction_free').on('change', function(e) { + if(e.target.checked) { + localStorage.setItem('pf_metro_ui.exp.df', true); + } else { + localStorage.removeItem('pf_metro_ui.exp.df'); + } + }); }); @endpush \ No newline at end of file