$(document).ready(function(){ window.boards = new Array(); if (window.Options && Options.get_tab('general')) { Options.extend_tab("general", ""); if (typeof localStorage.show_top_boards === 'undefined') { localStorage.show_top_boards = 'false'; var show_top = JSON.parse(localStorage.show_top_boards); } var show_top = JSON.parse(localStorage.show_top_boards); if (show_top) $('#show_top_boards>input').attr('checked', 'checked'); $('#show_top_boards>input').on('change', function() { var show_top = ($(this).is(':checked')); localStorage.show_top_boards = JSON.stringify(show_top); }); } function handle_boards(data) { $.each(data, function(k, v) { boards.push(''+v.uri+''); }) if (boards[0]) { $('.sub[data-description="1"]').after(' [ '+boards.slice(0,25).join(" / ")+' ] '); } } if (!(window.location.pathname != '' && window.location.pathname != '/' && window.location.pathname != '/index.html' && typeof show_top !== "undefined" && !show_top)) { $.getJSON("/boards-top20.json", handle_boards) } });