Guest User

Untitled

a guest
May 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. String.prototype.format = function () {
  2. var ret = [];
  3. var string = this,
  4. threadsStart = string.indexOf('<span class="filesize">File'),
  5. threadsEnd = string.indexOf("</blockquote>");
  6. if (threadsStart != -1 || threadsEnd != -1)
  7. ret.push( string.slice(threadsStart, threadsEnd) );
  8. for (i=1;i<10;i++)
  9. {
  10. alert(threadsStart);
  11. threadsStart = string.indexOf('<span class="filesize">File', threadsEnd+1);
  12. threadsEnd = string.indexOf('</blockquote>', threadsEnd+1);
  13. if (threadsStart != -1 || threadsEnd != -1)
  14. ret.push( string.slice(threadsStart, threadsEnd) );
  15. }
  16. return ret;
  17. };
Add Comment
Please, Sign In to add comment