CoderDojoPotsdam / regex-tutorial

Interactive Tutorial for Regular Expressions | Interaktives Tutorial für Reguläre Ausdrücke

Home Page:https://coderdojopotsdam.github.io/regex-tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve Footer

niccokunzmann opened this issue · comments

Website-link: https://coderdojopotsdam.github.io/regex-tutorial/de/02-02.html

Expected Behavior

I expect the language menu to show the selected language and
all code of the page to be running on offline
and fullfilling a purpose.
JavaScript code should be in its own JavaScript file.

Actual Behavior

https://github.com/CoderDojoPotsdam/regex-tutorial/blob/master/_layouts/tutorial.html#L145
In this line, we load a library from the web.
I do not see this resource being loaded, when I click on the page and open the network monitor.

The expected behavior seems to be fulfilled without the code following the library load.
Please remove it an see if this is still working.

Solution Description

  • please move the JavaScript code to its own JavaScript file.
  • test if the code can be removed
  • If it is needed: either add the library to the tutorial or replace the code using jquery with own JavaScript code
  • For having all in one place which belongs together,
    • add a "language" key to the localization with language codes pointing to the name of their language. de -> Deutsch
    • use this in the footer code to reduce the size of the code.

Hints

  • When you move the code, you may want to register an onload handler so part of it are executed when the page is fully loaded and all elements are present.
  • I would vote for removing jquery beause it is a huge dependency which it not required.