Refactored debug toolbar to use plain javascript #7400