The example in the documentation is bad - it redefines 'reverse' (which is fine), then attempts to use it.
The working version changes the name of the script (which is just a function) to '
reverse-selection' so it doesn't cause the error:
I still think making scripts is easy and fun but I apologise for not testing the documentation.
here is a script I just made (and tested);
#lang racket/base
;;; License: MIT/Apache2.0
(require browser/external
quickscript)
(script-help-string "Racket Survey.")
(define-script racket-survey
#:label "Racket Survey (browser)"
#:menu-path ("&News")
#:help-string "Complete the Racket Survey now"
(λ (str)
#f))
click new script in the menu and give it a name 'survey' this will create a file 'survey.rkt' in the user scripts folder
paste in the above, save and click 'compile scripts and reload'.
- you will find the script "Racket Survey (browser)" under 'News' in the scripts menu.
There is still time to enter and prizes to be won.
Stephen