Skip to content

full refactoring - #6

Open
flashpixx wants to merge 1 commit into
stvwhtly:masterfrom
flashpixx:master
Open

full refactoring#6
flashpixx wants to merge 1 commit into
stvwhtly:masterfrom
flashpixx:master

Conversation

@flashpixx

Copy link
Copy Markdown

Hello,

I have create a full refactoring of your jQuery plugin, because I need some additional features:

  • I add jQuery boilerplate code for create the plugin
  • I split up public and private methods of the plugin
  • I add functions like start, stop, reset to the plugin to control typing from outside
  • The plugin instance is bind to the DOM element which executes the constructor call
  • I reduce the recursive calls to speed-up the execution, so the delays are changed
  • I comment the source code for better understanding
  • I add more settings e.g. CSS classes to for defining the correct layout
  • I add a "result" option, so after a command has been typed the result is put to the output (for simulating execution results)
  • I add an automatic start option to the plugin
  • I add additional callbacks
  • I optimize the code with JSLint

For testing you can clone my current repository https://github.com/LightJason/lightjason.github.io
and use Hugo (https://gohugo.io/) and run it with the command "hugo -D server" and call the URL http://localhost:1313/terminal

If there are any questions, just contact me

@ktec

ktec commented Feb 12, 2017

Copy link
Copy Markdown

This is a great upgrade!! Thanks for sharing 👍
It doesn't seem to be a straight drop in replacement, any chance you could update the read me with the different api to make it work?

Comment thread jquery.teletype.js
// callback function to catch typing (parameter full teletype DOM object)
callbackType: null,
// callback function to catch backward moving (parameter full teletype DOM object)
vallbackBackward: null,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here!

Comment thread jquery.teletype.js


/**
* sets the next outpur sequence

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo!

Comment thread jquery.teletype.js
callbackFinished: null,
// callback function which is calld on start typing (parameter full teletype DOM object)
callbackStart: null,
// callback function which is called on restting DOM element (parameter full teletype DOM object)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resetting

@katp4

katp4 commented Aug 10, 2017

Copy link
Copy Markdown

Any plans on merging this request?

@daviddavo

Copy link
Copy Markdown

Merge this and add a documentation please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants