Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 13th, 2012  |  syntax: JavaScript  |  size: 1.06 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /* For Kongregate's Dawn of the Dragon
  2. // Outputs the raids URL links from your raid links tab.
  3. // You can filter the tab and run the script to get the last <number> of raids
  4. //
  5. // Needs:
  6. // SRDotDX FPX DOTD script plugin
  7. // Kongregate's Prototype.js to be available
  8. //
  9. // Copy and paste the script into the browser console from Chrome browser inspector, or firefox browser console.
  10. //
  11. // To use, type/run:
  12. // raw(10)
  13. //
  14. // To further filter by 'visited', run:
  15. // raw(10,1)
  16. //
  17. // or filter by 'not visited', run:
  18. // raw(10,2)
  19. //
  20. // Change the number to your desired last number of raids from your raids tab.
  21. */
  22.  
  23. var raw = function(num){
  24.         var visited = '';
  25.         if (arguments[1]){
  26.                 if (arguments[1] === 1){ // visited
  27.                         visited = ':not([raidvisited=false])'
  28.                 } else if (arguments[1] === 0) {
  29.                         visited = ':not([raidvisited=true])'
  30.                 }
  31.         }
  32.         $A($$('.raid_list_item:not(.hidden)' + visited + ' .raid_list_item_head a.link').slice(
  33.                 -num)).each(
  34.                         function(item){
  35.                                 console.log(window.location.href + item.attributes.getNamedItem('href').value
  36.         )}
  37. )}