var HISTORY={};HISTORY.max=max_history,HISTORY.savename="bm_history",HISTORY.checkLocalStorage=function(){return"function"==typeof Storage},HISTORY.storeLocalStorage=function(e,r){return!!HISTORY.checkLocalStorage()&&localStorage.setItem(e,JSON.stringify(r))},HISTORY.getLocalStorage=function(e){return void 0===typeof e?null:!!HISTORY.checkLocalStorage()&&(e in localStorage==!1?null:JSON.parse(localStorage[e]))},HISTORY.getStored=function(){var e=HISTORY.getLocalStorage(HISTORY.savename);return e?typeof e!=typeof{}?{}:e:{}},HISTORY.push=function(e,r){if(!HISTORY.checkLocalStorage())return!1;if(isNaN(e))return!1;var t=HISTORY.getStored();if(e in t&&delete t[e],Object.keys(t).length>=HISTORY.max){var a={};for(var n in t){var o=t[n];a[o.time]=o}var S=Object.keys(a);S.sort(),S.reverse();var c={};for(var i in S){if(!(i'+o.chapter_title+""+a}return a=""},HISTORY.run=function(){if(!1===HISTORY.checkLocalStorage())return jQuery("#theHISTORY").parent().parent().remove();var e=HISTORY.generateHTML();if(null===e)return jQuery("#theHISTORY").parent().parent().remove();jQuery("#theHISTORY").html(e)},jQuery(document).ready(function(){HISTORY.run()});