Cheating at incremental games using angularjs
I don't know a thing about javascript frameworks, but I like to cheat at incremental games. So it's frustrating when a game is made with some framework that seems to leave everything inaccessible. (I think this is more about the framework trying to be hygenic than anti-cheating)
So I was happy to learn enough about angularjs to cheat at my favorite incremental game of the moment, Swarm Simulator.
var sc = angular.element(document.querySelector('.ng-scope')).scope() sc.env.isDebugEnabled = 1 sc.game._units.byName.nexus.prodByName.energy.val = new Decimal(1000) sc.game.unit('mutagen')._addCount(new Decimal(1e100))
Marking anchors in HTML with a javascript bookmark
To send links to internal anchors in HTML documents, use this bookmarklet.
I find this bookmarklet very useful when sending people links to emc documentation and the wiki, because there are often more anchors available than those that are actually linked to in tables of contents.
glif: generate client-side gif files from javascript
It probably won't be the biggest thing since AJAX, but I hit upon the idea of generating images client-side. The current ways to do this seem to involve using tables or absolute-positioning of very small DIVs. (See, for example, http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm) My technique, which I call glif (for GIF and glyph), generates a gif-format image on the client side.
One application for this that comes immediately to mind is client-side generation of sparklines-type images, possibly from an AJAX source.
glif.html is a small demo which draws a sine wave in an image (Known not to work in IE) Update: SparGlif demo
All older entries
Website Copyright © 2004-2024 Jeff Epler