X-notifier 3.5.23 broken in Firefox 53. Fix is easy

Bug 1293305 removes non-standard for-each loops. This breaks X-notifier 3.5.23.

The fix is simple. Things like

for each(var l in this.listeners)

should be replaced with

for(var l of this.listeners)

I used the regex replacement for each\s*\((var )?(\w+) in ([^\)]+)\) --> for\($1$2 of $3\) in these files:

  • components\Main.js
  • components\CookieManager.js
  • components\CookieManager2.js
  • chrome\content\pref-script.js
  • chrome\content\options.js