<script>
if (opener) {
    opener.log("PASS");

    var result = {}, queryString = location.search.substring(1),
        re = /([^&=]+)=([^&]*)/g, m;
    while (m = re.exec(queryString)) {
      result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
    }
    if (result["nextOp"] == "click" && opener.click)
        opener.click();
    else if (result["nextOp"] == "space" && opener.pressSpace)
        opener.pressSpace();
    else if (result["nextOp"] == "notifyDone" && opener.notifyDone)
        opener.notifyDone();
}
</script>