Whiskey and rants

Biased ideas about things

How to plant (more) trees with Ecosia Search Engine

04 August, 2017 | Tips&Tricks

First of all, what's Ecosia?

Well, Ecosia is the search engine that plants trees with its ad revenue. They're claiming also they're doing it at a rate of a tree every 7 seconds. They also have a counter to show you how many trees were planted here (as in the video below).


You might notice that the counter is actually incremented by one every two seconds (not 7), but let's ignore this small detail and let's help them plant even more trees!






This fine screenshot is pointing you to the key elements here: an incremental operation (done in the Model, +1) and the interval that triggers it: every 2 seconds (timePerTree is setup server side as 2). With this at hand and a little bit of magic*, I've been able to help them plant even faster.

Check the result:




Javascript doesn't plant trees.



*no javascript was harmed during the making of this video