News for hackers. Stuff that matters.

tofu_ink

Re:Show HN: Virtual pet game made for my daughter on Thursday November 21, 2019 @06:00PM (#21600694)
console javascript hacking ;)

var ele = document.createElement('div'); ele.setAttribute('id', 'foo'); //$('.stage').append("<div id='foo'>m</div>"); document.getElementsByClassName('stage')[0].appendChild(ele);

var dict = { pain: { energy: 'paddle', waste: 'needs to fart' }, sad: { ideas: 'coffee' }, frustration: { fatigue: 'sleep', energy: 'food' // 'paddle' }, restless: { concentration: 'knit?', waste: 'fart' }, tired: { fatigue: 'needs sleep' } };

// happy concentration // estatic ideas / waste // restless waster

trigger = setInterval(function() { var s = getState(STATE); var msg = s.mood.name + ' ' + s.mood.reason ; if (dict[s.mood.name] && dict[s.mood.name][s.mood.reason]) msg = dict[s.mood.name][s.mood.reason]; var other = ['concentration','energy','fatigue','ideas','waste']; for (var i = 0; i < other.length; ++i) msg += ' ' + other[i] + ':' + (s.creature[other[i]].count).toFixed(1);

    document.getElementById('foo').innerHTML = '<small>'+ msg +'</small>';
}, 100)

/* i couldnt find the mute button */ function playSound(state, sound){}

Well thank you good to know, ill have to start experimenting to see how well it meets my needs. I mostly use stylus to to dark theme sites , remove side bars footers and headers, then expand the main article column to be 80 - 100% of the page. I really enjoy just reading an article with no distractions. (reddit is a pain)
I use that setup + a hosts block file, and i recently started using a pi-hole. I also use stylus to block a few custom elements and change themes for a few sites. I mostly visit news sites and some random sites.

The only issues i have had have been on pinterest. What sites do you have issues on?

Didn't consider that. However I would suspect anyone that anyone searching for them would rely on 10 seconds on the internet and they would stomp around to other sources.
Be sure to burn all the archived articles in libraries. We wouldn't want pesky expired history changing our minds.

... wait aren't online archives identical to hardcopy archives.... Silly me, they are totally different.