Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var str, matches, i, ii, count;
- str = $("body").html();
- matches = str.match(/id=".+"/g);
- for (i = 0; i < matches.length; i += 1) {
- count = 0;
- for (ii = 0; ii < matches.length; ii += 1) {
- if (matches[i] === matches[ii]) {
- count += 1;
- }
- }
- if (count > 1) {
- console.log("ID: " + matches[i] + " is used more then once!");
- }
- }
Add Comment
Please, Sign In to add comment