Advertisement
Kocayine

Untitled

Jul 11th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Show Youtube Tags
  3. // @namespace https://www.youtube.com/
  4. // @description Show the youtube tags
  5. // @include *://www.youtube.com/watch*
  6. // @version 1
  7. // ==/UserScript==
  8. var tagRepeatTimeout = setTimeout(tagAdditionCommand, 50);
  9.  
  10. function tagAdditionCommand() {
  11. if (!ytplayer) {
  12. tagRepeatTimeout = setTimeout(tagAdditionCommand, 50);
  13. return;
  14. }
  15.  
  16. var tags = ytplayer.config.args.keywords.replace(/,/g, ', ');
  17. if (!tags) {
  18. tags = "-";
  19. }
  20. var li = document.createElement('li')
  21. li.innerHTML =
  22. '<h4 class="title">Tags</h4> \
  23. <div class="content"> \
  24. <p id="eow-reuse"> ' + tags + ' </p> \
  25. </div>'
  26. document.getElementById('watch-description-extras').children[0].appendChild(li);
  27.  
  28. clearTimeout(tagRepeatTimeout);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement