Advertisement
Kocyk

yt

Sep 26th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <script src="https://apis.google.com/js/platform.js"></script>
  2.  
  3. <script>
  4. function onYtEvent(payload) {
  5. if (payload.eventType == 'subscribe') {
  6. // Add code to handle subscribe event.
  7. } else if (payload.eventType == 'unsubscribe') {
  8. // Add code to handle unsubscribe event.
  9. }
  10. if (window.console) { // for debugging only
  11. window.console.log('YT event: ', payload);
  12. }
  13. }
  14. </script>
  15.  
  16. <div class="g-ytsubscribe" data-channelid="UCepCNuYZY9KzbzpSP1552Wg" data-layout="full" data-count="default" data-onytevent="onYtEvent"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement