Background
eLearning professionals find themselves working in a variety of online systems, but JavaScript tends to be a common language across most tools that use HTML/CSS that can be used for streamlining workflows and creating shortcuts.
Task
Create a JavaScript function that can be useful for other professionals or researchers. It should abide by legal and ethical requirements and should have one of the following contexts:
- A Standard Website
- Canvas
- EdTech Books
Then, test your function on at least 10 different pages in your context to ensure that it behaves the way you anticipate. Debug and improve your function as needed.
Examples
The possibilities here are endless, but some useful categories of functions might include the following:
- Find something on the page (e.g., images, headings)
- Analyze something on the page (e.g., word count, readability, accessibility features)
- Change something on the page (e.g., resize images, strip unwanted content, capitalize terms, replace double spaces).
In any case, be sure that you are providing an appropriate output for your function. For instance, if you are finding content, then you would want the output to show as a table or a list, while if you are changing content, you might just want to notify your user that the change occurred.
You can also combine find, analyze, and change functions, such as by analyzing the word count of a page in Canvas and then appending the results to the page so that readers can see it.