code-sensei/sensei-grading-bookmarklet/README.md

58 lines
2.3 KiB
Markdown
Raw Normal View History

2020-12-26 14:21:56 -05:00
# `sensei-grading-bookmarklet`
2021-01-02 17:30:47 -05:00
[![Bookmarklet Size][bookmarklet_size_badge]][bookmarklet_file]
2020-12-26 17:54:59 -05:00
> A bookmarklet to enhance the grading experience of code ninja assignments.
2020-12-26 17:48:38 -05:00
2021-01-02 17:30:47 -05:00
## Purpose
Grading code ninjas' submissions is slow and tedious because the current site has a poor user experience.
My goal is to make an entirely keyboard-navigable enhancement in the form of a bookmarklet.
2021-01-12 19:46:54 -05:00
## Getting Started
2021-01-12 19:43:53 -05:00
To install a bookmarklet, it must be added to your bookmarks bar.
1. Right-click your bookmark bar.
1. Click "Add page...".
1. Set the name to `Sensei Grading +`.
1. Set the URL to [the latest bookmarket distribution][bookmarklet_file].
1. Click "Save".
2021-01-12 19:46:54 -05:00
Now that you have installed the bookmarklet, using it is as simple as the following steps:
2021-01-12 19:43:53 -05:00
1. Visit the [grading console][grading_console] while logged in as a code sensei.
1. Click "Sensei Grading +" on your bookmarks bar to execute the bookmarklet code.
1. Grade.
2021-01-02 17:30:47 -05:00
## Keybinds
| Key | Action |
| ---------------- | ------------------------------ |
| <kbd>i</kbd> | Marks assignment as incomplete |
2021-01-02 18:07:29 -05:00
| <kbd>s</kbd> | Skips to next assignment |
2021-01-02 17:30:47 -05:00
| <kbd>1</kbd> | Rates assignment as 1-star |
| <kbd>2</kbd> | Rates assignment as 2-star |
| <kbd>3</kbd> | Rates assignment as 3-star |
| <kbd>enter</kbd> | Submits assigment grade |
2020-12-26 14:21:56 -05:00
## Development
2020-12-26 17:53:13 -05:00
This [bookmarklet][bookmarklet_definition] is compiled using [NodeJS][node_installation].
2020-12-26 17:48:38 -05:00
Upon cloning this project, execute `npm i` to install of the necessary dependencies.
2020-12-26 14:21:56 -05:00
To run in development mode, run `npm run dev`.
2020-12-26 17:48:38 -05:00
To generate the bookmarklet, run `npm start`.
2020-12-26 14:21:56 -05:00
2020-12-26 17:48:38 -05:00
## Security
2020-12-26 17:53:13 -05:00
For security reasons, modern browsers will make you type out the prefix (`javascript:`) manually.
2020-12-26 17:48:38 -05:00
They use this as a method of opting into the potentially dangerous act of executing foreign JavaScript on a webpage.
2021-01-12 19:35:16 -05:00
This code, however, is non-malicious, so no worries.
2020-12-26 17:48:38 -05:00
2020-12-26 14:21:56 -05:00
[grading_console]: https://gdp.code.ninja/Grading
[bookmarklet_definition]: https://en.wikipedia.org/wiki/Bookmarklet
2020-12-26 17:48:38 -05:00
[node_installation]: https://nodejs.org/en/download/
2021-01-02 17:39:01 -05:00
[bookmarklet_size_badge]: https://img.shields.io/github/size/EthanThatOneKid/code-sensei/sensei-grading-bookmarklet/bookmarklet.txt?label=bookmarklet%20size
2021-01-02 17:40:35 -05:00
[bookmarklet_file]: https://raw.githubusercontent.com/EthanThatOneKid/code-sensei/main/sensei-grading-bookmarklet/bookmarklet.txt