{"author_link":"\/users\/terracottafrog","author_name":"TerraCottaFrog","author_uid":"terracottafrog","comments":[],"epoch":1511115431,"event":"LD40","format":"md","ldjam_node_id":51807,"likes":42,"metadata":{"p_key":"101210","p_author":"TerraCottaFrog","p_authorkey":"1000035","p_urlkey":"316929","p_title":"Script to add keyboard controls to Theme Slaughter","p_cat":"LDJam ","p_event":"LD40","p_time":"1511115431","p_likes":"42","p_comments":"0","p_status":"WAYBACK","us_key":"1000035","us_name":"TerraCottaFrog","us_username":"terracottafrog","event_start":"1512086400","event_key":"70","event_name":"LD 40"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD40","removed_author":false},"_superparent":49883,"_trust":7,"author":35,"body":"I made up a tiny script to add keyboard controls to the slaughter if anyone is interested.\n\nJust copy the script into the console when on the slaughter page. Uses Z for yes, X for no, and K for flag. You can change the keys by changing the variable declarations, of course.\n\n```javascript\nvar yesKey = \"z\"\nvar noKey = \"x\"\nvar flagKey = \"k\"\n\ndocument.addEventListener(\"keypress\",function(e){\n\tif (e.key == yesKey){\n\t\tdocument.querySelector(\"button.-green\").click()\n\t}\n\tif (e.key == noKey){\n\t\tdocument.querySelector(\"button.-red\").click()\n\t}\n\tif(e.key == flagKey){\n\t\tdocument.querySelector(\"button.-tiny\").click()\n\t}\n})\n\n```","comments":6,"comments-timestamp":"2017-11-20T18:31:19Z","created":"2017-11-19T18:13:17Z","files":[],"files-timestamp":0,"id":51807,"love":42,"love-timestamp":"2017-11-30T21:54:49Z","meta":[],"modified":"2017-11-30T21:54:49Z","name":"Script to add keyboard controls to Theme Slaughter","node-timestamp":"2017-11-19T18:17:11Z","parent":50300,"parents":[1,5,9,49883,50300],"path":"\/events\/ludum-dare\/40\/the-more-you-make\/script-to-add-keyboard-controls-to-theme-slaughter","published":"2017-11-19T18:17:11Z","scope":"public","slug":"script-to-add-keyboard-controls-to-theme-slaughter","subsubtype":"","subtype":"","type":"post","version":145385},"node_metadata":{"n_key":"51807","n_urlkey":"316929","n_parent":"50300","n_path":"\/events\/ludum-dare\/40\/the-more-you-make\/script-to-add-keyboard-controls-to-theme-slaughter","n_slug":"script-to-add-keyboard-controls-","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"35","n_created":"1511115197","n_modified":"1512078889","n_version":"145385","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/40\/the-more-you-make\/script-to-add-keyboard-controls-to-theme-slaughter","text":"I made up a tiny script to add keyboard controls to the slaughter if anyone is interested.\n\nJust copy the script into the console when on the slaughter page. Uses Z for yes, X for no, and K for flag. You can change the keys by changing the variable declarations, of course.\n\n```javascript\nvar yesKey = \"z\"\nvar noKey = \"x\"\nvar flagKey = \"k\"\n\ndocument.addEventListener(\"keypress\",function(e){\n\tif (e.key == yesKey){\n\t\tdocument.querySelector(\"button.-green\").click()\n\t}\n\tif (e.key == noKey){\n\t\tdocument.querySelector(\"button.-red\").click()\n\t}\n\tif(e.key == flagKey){\n\t\tdocument.querySelector(\"button.-tiny\").click()\n\t}\n})\n\n```","title":"Script to add keyboard controls to Theme Slaughter","wayback_source":[]}