factor shared logic into showContextSources (#1182)
factor shared logic into showContextSources (#1182)

hide and show tabs and buttons using the same code path for
code injection and gist loading
dart-lang/dart-pad,dart-lang/dart-pad,dart-lang/dart-pad,dart-lang/dart-pad