'; htmls[o.key]=html.substring(html.indexOf(start)+start.length, html.indexOf(end)); //console.log(htmls[o.key]); checkDone(); }); }(o); } // only need to remove stuff if there was a change //console.log('last', lastBoardFilter, 'current', bFiltersElem.value) if (lastBoardFilter != bFiltersElem.value) { for(var i in toRemove) { var o=toRemove[i]; // locate post var parts=o.key.split(/#/); var postid=parts[parts.length-1]; var parts=o.key.split(/\//); var board=parts[0]; var elem=document.getElementById(board+'_'+postid); //console.log('remove?', o, elem); if (elem) { elem.parentNode.removeChild(elem); delete postUniques[o.key]; } } } // probably should check against filter for items to remove lastBoardFilter = bFiltersElem.value; setTimeout(updateHomepage, 5000); }); } // load posts into postUniques var elems=divLPost.querySelectorAll('a'); for(var i in elems) { if( elems.hasOwnProperty( i ) ) { var post=elems[i]; postUniques[post.href]=post.parentNode; } } //console.log('postUniques', postUniques); // load filters var boardFilterSetting = getSetting('eos_boardfilter') console.log('eos_boardfilter', boardFilterSetting); var bFiltersElem=document.getElementById('boardFilters'); bFiltersElem.value=boardFilterSetting; var cv=document.getElementById('canvas'); cv.style.height=bFiltersElem.value?'250px':'300px'; // start update setTimeout(updateHomepage, 1000); } function eyeblink(schedule) { var cv=document.getElementById('canvas'); cv.style.height='1px'; setTimeout(function() { var bFiltersElem=document.getElementById('boardFilters'); cv.style.height=bFiltersElem.value?'250px':'300px'; }, 150); // close it for 50ms if (schedule) { setTimeout(function() { eyeblink(1); }, 15000+(Math.random()*5000)); } } // Scientists have shown that the average person blinks 15-20 times per minute. // 60/20 to 60/15 = every 3-4s /* Generally, between each blink is an interval of 2–10 seconds; actual rates vary by individual averaging around 10 blinks per minute in a laboratory setting. However, when the eyes are focused on an object for an extended period of time, such as when reading, the rate of blinking decreases to about 3 to 4 times per minute. This is the major reason that eyes dry out and become fatigued when reading. */ setTimeout(function() { eyeblink(1); }, 15000+(Math.random()*5000)); function saveBoardFilter() { var bFiltersElem=document.getElementById('boardFilters'); var days=365*10; // remember this setting for 10 years setSetting('eos_boardfilter', bFiltersElem.value, days); clearList(); console.log('saved', bFiltersElem.value, 'in eos_boardfilter'); }

Eye of Sauron monitors new posts on EndChan - Idea by TheBaconFromHell, Implementation OdiliTime