The new code has following advantages over the original one:
- Added pause and play option
- Once the game ends, stops play. Original code just restarted the game
- Changed the position of game name and score
- Replaced absolute font size with relative sizes.
I created a github and uploaded the code for this simple game. You can also play it here
I have started working on a greasemonkey script. I tried using jquery but sadly the page I was working on doesn’t include jquery. Found this link which allows you to use jquery.
Later found out, it wasn’t required on the newer versions of greasemonkey which allows loading external js/css using @require. The mistake I was doing was: the @require tags are required between
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
This is cleanly mentioned at the greasespot wiki here. That’s why the say read the manual.