Created
April 9, 2012 23:55
-
-
Save mehdimehdi/2347465 to your computer and use it in GitHub Desktop.
Snippet for ebay motors
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
<!-- this is the usual PunchTab Snippet --> | |
<script type="text/javascript" charset="utf-8"> | |
var _ptq = _ptq || []; | |
var _punchtab_settings = { | |
key: "YOUR KEY", | |
display: "inline", | |
notification: false, | |
earningmap: false | |
}; | |
(function() { | |
var pt = document.createElement('script'); pt.type = 'text/javascript'; pt.async = true; | |
pt.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.punchtab.com/js/pt.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pt, s); | |
})(); | |
//this is the code to turn on your earning map when the user is authenticated. | |
//make sure to use the class "little-orange-key" for the earning map | |
//by default it should be display:none | |
window.ptAsyncInit = function () { | |
PT.events.bind("authenticated", function () { | |
var orangeKeys = punchtab.util.getElementsByClassName(document.body, "little-orange-key"); | |
for (var i = 0; i < orangeKeys.length; i++) { | |
orangeKeys[i].style.display = "block"; | |
} | |
}); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment