core: move centralized custom scripts on top of base.jinja and move getCookie inside

2 jobs for makdown-editor in 11 minutes and 57 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Test
passed #1944
black

00:01:58

passed #1943
test

00:11:57

60.0%