UI component experiment using the hack tool found in the original Deus Ex game. The component relies on the polymer library.
The login frame looks like this:
Install from bower:
bower install icebreaker
Then add an import to the built html:
<link rel="import" href="./bower_components/icebreaker/icebreaker.build.html">
Then include it by using the custom tag:
<form is="ice-breaker"></form>
Then, you can listen out in your JavaScript for the hack
and hackDone
events, and do whatever with them.
var ice = document.querySelector('form');
ice.addEventListener('hack', function () {
// do whatever
});
You need to include a script tag to polyfill web component support on browsers other than chrome:
<script src="./bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
and you will probably want to vulcanize the component into your set of components, so all of them use the same version of polymer.
- XHR log in to a limited account on
hack
. - Refresh the page on
hackDone
to see the login results reflected.
Clone and from the directory run the following:
bower install
npm install
npm run testling