Advertisement
Guest User

Untitled

a guest
Aug 9th, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. // ==UserScript==
  2. // @name ESR AJAX Plus
  3. // @namespace http://www.esreality.com/
  4. // @include http://www.esreality.com/*
  5. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
  6. // ==/UserScript==
  7.  
  8. $('a[title^="Click [+]"]').each(function(i, item) {
  9. $(this).click(function() {
  10. var href = $(this).attr('href')
  11. var post_id = parseInt(href.match(/post_id=(\d+)/)[1])
  12. $.ajax({url: href, dataType: 'html'}).success(function(html) {
  13. var selector = 'a[class="judgementvalue"][href$="post_id=' + post_id + '"]'
  14. $(selector).html($(selector, html).html())
  15. }).error(function() {
  16. alert('Something went wrong, sorry :/')
  17. })
  18. return false
  19. })
  20. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement