Guest User

Untitled

a guest
Jun 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. var str, matches, i, ii, count;
  2. str = $("body").html();
  3. matches = str.match(/id=".+"/g);
  4.  
  5. for (i = 0; i < matches.length; i += 1) {
  6. count = 0;
  7. for (ii = 0; ii < matches.length; ii += 1) {
  8. if (matches[i] === matches[ii]) {
  9. count += 1;
  10. }
  11. }
  12. if (count > 1) {
  13. console.log("ID: " + matches[i] + " is used more then once!");
  14. }
  15. }
Add Comment
Please, Sign In to add comment