how to update welcome page
bogdartysh opened this issue · comments
Bogdan Artyushenko commented
Is there a way to customize welcome page ?
thus I'll load needed code and print customized welcome message?
Ike Mawira commented
Did you mean editing the main html page that loads when running gorilla-repl?
I have found some tricks.
- Edit a worksheet. Worksheets are the objects displayed at the main file that are like text boxes. Gorilla Repl uses KnockoutJs models and view models. You can edit a worksheet's segment property to edit the data displayed in a worksheet. The segment property is a list of segments,
ko.observableArray()
which can be manipulated with normal Javascripts.push
and.pop
methods e.g here to add a free segment or here to add a code segment. Duplicate the method to see the effect. - To print to console, add your console function inside this. This will get called once this javascript is loaded, which happens on every page reload.
- The other way is editing the HTML directly at from this file
Hope this helps.