EyEBURNeR

open ga update helper

May 11th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. // ==UserScript==
  2. // @id elegopen
  3. // @name elegopen
  4. // @version 1.0
  5. // @namespace
  6. // @author EyEBURNeR
  7. // @description open ga update helper
  8. // @include http://steamcommunity.com/groups/EverybodyLEG/discussions/0/864957817400238292/*
  9. // @run-at document-end
  10. // ==/UserScript==
  11.  
  12. var $ = unsafeWindow.jQuery;
  13.  
  14.  
  15. $('.grouppage_content_area').after($('<textarea/>')
  16. .attr('id','eleg').attr('style','width:100%;height:400px;'))
  17. .after($('<button/>').text('parse').click(function(){$('.commentthread_comment').each(parseComment);}))
  18. ;
  19.  
  20.  
  21. function parseComment(){
  22. $('.bb_link:contains(giveaway)', this).each(parseLink);
  23. }
  24. function parseLink(){
  25.  
  26. var giver = $.trim($(this).parents('.commentthread_comment:first').find('.commentthread_comment_author a:first').text());
  27. $('#eleg').val($('#eleg').val()+'[*] '+$(this).attr('href')+' - '+giver+'\n');
  28. }
Advertisement
Add Comment
Please, Sign In to add comment