0.2.7 • Published 12 months ago

@roudanio/keyboard-masher v0.2.7

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

Keyboard Masher

Usage:

import KeyboardMasher from "https://unpkg.com/@roudanio/keyboard-masher@latest/dist/keyboard-masher.js";

// fist parameter is the element selector
// second parameter is a config object
KeyboardMasher.init('#keyboard-masher-container', {
  root: 'https://unpkg.com/@roudanio/keyboard-masher@latest/dist/',
});
KeyboardMasher.on('gameOver', (...args) => {
  console.log('game over: ', args);
});

The default config object is like this:

{
  root: location.origin,
  i18n: i18nDefault, // default i18n setting is in i18n.json
}

The default i18n is put in file ./src/i18n.json. The content is like this:

{
  "name": "Keyboard Masher",
  "keysCombination": "Keys Combination",
  "selectKeysCombination": "Select the keys combination you like",
  "selectAllKeys": "All Keys",
  "selectCustomizeKeys": "Customize keys you like to smash",
  "hitKeys": "Hit the keys you want to smash:",
  "start": "Start",
  "ok": "OK",
  "reset": "Reset",
  "timerDuration": "Timer Duration",
  "chooseTimerDuration": "Choose the timer duration",
  "customizeTimerDuration": "Customize the timer duration",
  "setTimerDuration": "Set the seconds for the timer",
  "second": "second",
  "seconds": "seconds",
  "play": "Play!",
  "score": "Score",
  "back": "Back",
  "gogogo": "Go! Go! Go!",
  "typeBegin": "Type on your keyboard to begin.",
  "time": "Time: ",
  "timesUp": "Times up!",
  "restart": "Restart",
  "tweet": "Tweet",
  "facebook": "Facebook",
  "copyLink": "Copy Link",
  "stat": "Statistics",
  "shareText": "I have smashed %SCORE% keys in %DURATION% seconds! That's %CPS% keys per second! My favorite key is %FAV_KEY%. Can you smash your keyboard like this?"
}
0.2.7

12 months ago

0.2.6

12 months ago

0.2.5

12 months ago

0.2.3

12 months ago

0.2.4

12 months ago

0.2.1

12 months ago

0.2.0

12 months ago

0.1.4

1 year ago

0.2.2

12 months ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago