jonatkins/ingress-intel-total-conversion — pull request #900 by Blaisorblade (2014-11-08 18:22:21+00:00)
Title: #896: Ensure updateMap calls endCompoundOperation

Ensure endCompoundOperation is called whenever beginCompoundOperation completes, even if removeRange (or anything in the range) fails. Moreover, call `removeRange` only when there is text to remove, since apparently the realtime API complains otherwise.

This is a quick hack — I tested locally "essentially the same changes" done with TamperMonkey, and it appears to work well.