added code from forums, updated slightly to add error checking and line termination.
updated method used to determine pane name (it was incorrect on the code example in the forums)
removed console.log
Merge pull request #142 from ohine/DNN-4756

DNN-4756: Performance issue loading edit mode with 50+ modules on page