gorilla-repl icon indicating copy to clipboard operation
gorilla-repl copied to clipboard

how to update welcome page

Open bogdartysh opened this issue 6 years ago • 1 comments

Is there a way to customize welcome page ? thus I'll load needed code and print customized welcome message?

bogdartysh avatar Dec 03 '19 14:12 bogdartysh

Did you mean editing the main html page that loads when running gorilla-repl?

I have found some tricks.

  1. 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.
  2. 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.
  3. The other way is editing the HTML directly at from this file

Hope this helps.

MawiraIke avatar Dec 29 '19 21:12 MawiraIke