Created
May 8, 2011 01:27
-
-
Save danbeam/961018 to your computer and use it in GitHub Desktop.
smugmug-immediate-object.js
This file contains hidden or 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
({ | |
'window' : this, | |
'position' : 'UI Engineer', | |
'location' : 'SmugMug', | |
'website' : 'http://smugmug.com/jobs', | |
'skills' : [ 'javascript', 'css', 'web standards', 'object oriented programming', 'php' ], | |
'benefits' : { | |
'awesomeTeam' : true, | |
'technicalCEO' : true, | |
'microManagement' : false, | |
'onSiteChef' : true, | |
'onSiteTrainer' : true, | |
'cadillacHealthcare' : true, | |
'closedMinded' : false, | |
'useOldTech' : false | |
}, | |
'apply' : function (yourEmail, resume) { | |
// You can't just use send(), here, you have to use this.send | |
// This is changed to {job} when declared inside an object literal | |
// http://www.nczonline.net/blog/2010/01/26/answering-baranovskiys-javascript-quiz/ Example #5 | |
this.send(yourEmail, '[email protected]', 'I saw SmugMug at JSConf!', resume); | |
}, | |
'send' : function (from, to, subject, body) { | |
var link = 'mailto:' + this.window.escape(to) | |
+ '&subject=' + this.window.encodeURIComponent(subject) | |
+ '&body=' + this.window.encodeURIComponent(body); | |
this.window.location.href = link; // wasn't working for me, P.S. | |
} | |
}).apply('[email protected]', 'http://danbeam.org/resume'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment