Refactored debug toolbar to use plain javascript #7400

This is MT. It should be `document.cookie`, right?