• This repository has been archived on 16/Aug/2020
  • Stars
    star
    108
  • Rank 311,372 (Top 7 %)
  • Language
    CoffeeScript
  • Created over 11 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A library for simulating typewriter effect in the browser

realistic-typewriter.js

Build Status

A library for simulating typewriter effect in the browser.

Demo

Current version is 0.2. It is a complete rewrite of the previous version. The Documentation is still incomplete (look at the examples for now.)

v0.1 is available here.

Usage

var tw = typewriter(targetDomElement).withAccuracy(90) // an integer between 0 and 100 (100 means no typos)
                                     .withMinimumSpeed(5) // minimum typing speed (characters per second)
                                     .withMaximumSpeed(10) // maximum typing speed
                                     .build();

tw.clear() // clear targetDomElement
  .put('$ ') // instantly put '$ ' in targetDomElement
  .waitRange(1000, 2000) // wait randomly between 1000ms and 2000ms
  .type('whoami') // type 'whoami'
  .put('<br/>') // yes, you can put html tags in targetDomElement
  .wait(2000) // wait for 2000ms
  .put('realistic-typewriter.js', function () {
    console.log('yeah'); // 1
  })
  .put('<br/>') // will be executed after 1
  .waitRange(500, 1000)
  .put('$ ')
  .waitRange(1000, 2000)
  .type('exit', function () {
    console.log('finished');
  });

Installation

You can use this library with browserify or download a pre-compiled version (see below) from the project's releases page.

build/typewriter-bundle.js is the browserify bundle.
build/typewriter-bundle.min.js is the minified version of the browserify bundle.
build/typewriter-bundle-sa.js is the UMD browserify bundle.
build/typewriter-bundle-sa.min.js is the minified version of the UMD browserify bundle.

Building from source-code

Requirements

Node.js v6.9.0+

Instructions

  1. Clone the repository
  2. run npm install

Cake tasks

Install CoffeeScript globally and run cake to see available tasks.

Contributing

You are welcome to contribute via pull requests; fork the repository, make your changes and submit a pull request.

License

Copyright (c) 2013 Fardjad Davari

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

node-llmatic

Use self-hosted LLMs with an OpenAI compatible API
TypeScript
57
star
2

docker-network-exposer

Reach docker containers from the host machine on macOS and Windows where the bridge interface is not available
JavaScript
8
star
3

node-ascaid

Hassle-free documentation generation powered by AsciiDoc
JavaScript
6
star
4

docker-webhook-deploy

Clones a Git repository and executes a custom setup script upon receiving webhooks
Shell
6
star
5

node-interactive-commander

Commander.js with integrated interactive prompts
TypeScript
6
star
6

dotfiles

My dotfiles for macOS and Linux
Shell
4
star
7

rs-llama-cpp

Automated Rust bindings generation for LLaMA.cpp
C++
4
star
8

persian-pc.keylayout

Windows-like Persian keyboard layout for OS X
3
star
9

node-vfs-covid-api

A RESTful API to get VFS visa application centers' info
TypeScript
3
star
10

node-desktop-notification

Native addon for displaying desktop notifications
C++
2
star
11

sbu-431184310-final-project

Python
1
star
12

dd-trace-with-esm-loader

A minimal-ish example of using dd-trace with ts-node/esm
TypeScript
1
star
13

my-vim-setup

Deprecated. See https://github.com/fardjad/dotfiles
Vim Script
1
star
14

omnia2teeter-deviceiocontrol

Omnia II WVGA Teeter Sensor Adaption Layer
C
1
star
15

deno-asciidoctor-server

Serve Asciidoc as HTML with live-reload support
TypeScript
1
star
16

sigtool

A tool for signature ripping and null-signing Android zipped ROM images
C
1
star
17

map-winkey-left-right-to-home-end-in-ubuntu

Map WinKey+Left/Right to Home and End keys in Ubuntu
1
star
18

chrome-automatic-browsing-data-cleaner

A Chromium-compatible browser extension to clear browsing data at startup and on exit
JavaScript
1
star
19

fardjad.github.io

SCSS
1
star
20

node-create-interactive-commander

Scaffold a CLI project with interactive-commander and TypeScript
TypeScript
1
star