Posted 12 years ago
·
Author
This code stops badge autogranting and instead when someone tries to get your badge, sends them to a page. Many devs are using this to redirect people to a product page where they promise to give you the badge if you buy their product.
<script type="text/javascript">
$(document).ready(function() {
var myIMVUID = 25522141; // this is mine, substitute your own
var productID = 13850517; // used to redirect to a product page
var badgeNumbers = [1,2,3,4]; // if you only have one badge, use [1]
for (var i in badgeNumbers) {
YAHOO.util.Event.removeListener('grant-badge-' + myIMVUID + '-' + badgeNumbers[i], 'click');
YAHOO.util.Event.addListener('grant-badge-' + myIMVUID + '-' + badgeNumbers[i], 'click', function() {
window.open("http://www.imvu.com/shop/product.php?products_id=" + productID, "_blank");
});
}
});
</script>