So, what I'm currrently doing is using the scripts collection from the document object for the entire page (not just the head tag) and then iterating through all the scripts to determine if the script is there or not.
(As opposed to getting the raw source and searching for the text.) I'd still like to be able to get the raw source for a particular tag and am interested if anybody has a better method for isScriptOnPage...
function isScriptOnPage(uniqueScriptTag) {
page = currentPage();
allScripts = page.contentDocument.scripts;
var found = false;
for (var i=0; i < allScripts.length; i ++) {
if (allScripts.src.indexOf(uniqueScriptTag) != -1 ) {
found = true;
break;
}
}
return found;
}