Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to update welcome page #289

Open
bogdartysh opened this issue Dec 3, 2019 · 1 comment
Open

how to update welcome page #289

bogdartysh opened this issue Dec 3, 2019 · 1 comment

Comments

@bogdartysh
Copy link

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

@MawiraIke
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants