Created
February 23, 2012 21:51
-
-
Save SethWilson/1895262 to your computer and use it in GitHub Desktop.
Complete Checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* complete_checkout.js | |
* | |
* This little bookmarklet populates the checkout screen with default values | |
* | |
* MIT Licensed. | |
* | |
* Copyright 2011-2012 Seth Wilson @SethWilson | |
* | |
* ------------------------------------------------ | |
* author: Seth Wilson | |
* version: 0.1 | |
* url: | |
* source: | |
*/ | |
function runthis() { | |
// your JavaScript code goes here! | |
$('input[name$="firstname"]').val('Seth'); | |
$('input[name$="lastname"]').val('Wilson'); | |
$('input[name$="address"]').val('27 Bannisdale Way'); | |
$('input[name$="city"]').val('Carlisle'); | |
$('input[name$="postal"]').val('L0R 1H2'); | |
$('input[name$="email"]').val('[email protected]'); | |
$('input[name$="phone"]').val('905-690-7127'); | |
$('select[name$="province"]').val("ON"); | |
} | |
if (typeof jQuery == 'undefined') { | |
var jQ = document.createElement('script'); | |
jQ.type = 'text/javascript'; | |
jQ.onload=runthis; | |
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; | |
document.body.appendChild(jQ); | |
} else { | |
runthis(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment