Skip to content

Instantly share code, notes, and snippets.

@tyilo
Created September 14, 2013 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyilo/6565856 to your computer and use it in GitHub Desktop.
Save tyilo/6565856 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @id chrome-image-form-crash@tyilo.com
// @name Chrome Crash Test: Insert form on image and submit
// @version 1.0
// @namespace http://tyilo.com/
// @author Asger Drewsen <asgerdrewsen@gmail.com>
// @description ...
// @include http://www.w3.org/Graphics/PNG/alphatest.png
// @run-at document-end
// ==/UserScript==
var form = document.createElement('form');
form.setAttribute('method', 'POST');
form.setAttribute('action', '');
var input = document.createElement('input');
input.setAttribute('type', 'text');
input.setAttribute('name', 'input_value');
input.setAttribute('value', 'Click submit');
var submitButton = document.createElement('button');
submitButton.setAttribute('type', 'submit');
submitButton.appendChild(document.createTextNode('Submit'));
form.appendChild(input);
form.appendChild(submitButton);
document.body.appendChild(form);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment