My main problem though is that I can't seem to see the purpose of functions, because more often than not they are written in a, to me, foreign way.
An example I have is this uncommented if statement:
`if (tab.url.toLowerCase().indexOf("https://facebook.com") > -1)`
Should it be clear to me immediately that this means "If the target website is open"? It took me a solid minute just to understand this statement.
Are there some common design patterns I should memorise?