Custom Javascript Blocks
Using the Custom JS Block
Sites that use Cynder and the block editor can take advantage of a custom Aurora block to submit Javascript they’d like to load in a block on a particular page (or in a pattern). Once submitted, users will need to wait for an Aurora site admin to approve the block before the code will function properly.
Begin by adding a block by selecting it from the inserter or by typing / UC Custom JS in the block editor. Then add a label, which will be used to easily identify the code snippet during review. Finally, write or paste in the custom Javascript into the code area, which features basic syntax highlighting. Once saved, network admins will be sent an email automatically and will review the submission in a timely fashion.
In the meantime, the block will show a yellow banner while the submission is pending.
If the submission is rejected, the block’s banner will turn red and will include a note from the reviewer describing why it’s been rejected.
Alternatively, the banner will be green once the snippet is accepted.
Like the banner says, any changes to an accepted submission will cause it be pending again and will require another review and approval.
Only make changes to accepted code blocks when you require a new review.
An accepted code snippet will begin to work immediately upon network approval, but won’t function at all while pending or rejected.
Site-Wide Custom JS
Network admins can also place custom Javascript that will load for an entire site, rather than on a per-block basis. If you are interested in taking advantage of this, submit a service ticket to the Web Dev team and attach the desired Javascript as a file in the submission.