var search_me = '274_63396'; var scriptElems = document.getElementsByTagName('script'), i=scriptElems.length - 1, curLoc; for (; i; --i) { curLoc = scriptElems[i]; if ('innerText' in curLoc) { if (curLoc.innerText.indexOf(search_me)) break; }else if ('textContent' in curLoc) { if ... READ the POST