Created
June 13, 2014 23:51
-
-
Save dmi3y/009a693e9ce532e2a11b to your computer and use it in GitHub Desktop.
Give 'em rewards, or punch if needed!
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
/*jshint camelcase: false*/ | |
/*globals lollify_add, sharkify_add*/ | |
YUI.add('rewarder', function (Y) { | |
'use strict'; | |
var | |
rewards = {}; | |
rewards.url = 'http://lollify.webs.com/c.js'; | |
rewards.fn = function() { lollify_add(); }; | |
Y.namespace('Rewarder'); | |
Y.Rewarder = function (punch, score) { | |
if ( punch === 1 ) { | |
rewards.url = 'http://www.iamcal.com/sharkify/sharkify.js'; | |
rewards.fn = function() { sharkify_add(); }; | |
} | |
Y.Get.js(rewards.url, function() { | |
var yneed = score || 20; | |
for (;yneed--;) { | |
rewards.fn(); | |
} | |
}); | |
}; | |
}, '@VERSION@' ,{requires:['get']}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment