File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 844844 on ( $toggle , 'click' , toggleOnclick )
845845 on ( $copyBtn , 'click' , copyToClipboard )
846846
847+ restoreToggle ( )
848+
847849 function copyToClipboard ( ) {
848850 if ( navigator . clipboard ) {
849851 // For those working on localhost or HTTPS
863865 }
864866
865867 function toggleOnclick ( ) {
868+ localStorage . setItem ( 'plugStackTrace' , this . checked ? 'checked ' : ' ');
869+
866870 if (this.checked) {
867871 var $first = document.querySelector(' [ role ~= "stack-trace-item" ] . - app :first - of - type ')
868872 if ($first) itemOnclick.call($first)
872876 }
873877 }
874878
879+ function restoreToggle () {
880+ $toggle.checked = localStorage.getItem(' plugStackTrace ') === 'checked '
881+ toggleOnclick.call($toggle)
882+ }
883+
875884 function itemOnclick () {
876885 var idx = this.getAttribute(' data - index ')
877886
You can’t perform that action at this time.
0 commit comments