<commit_before><?php
$url = $this->GetWidgetUrl();
$iframe = false;
switch ($url) {
    case 'nopayment':
    case 'disabled':
        break;
    case 'paid':
        echo 'Order payment received.  Place Order to complete.';
        break;
    case false:
        echo 'Error creating invoice. Please try again or try another payment solution.';
        break;
    default:
        $iframe = '<iframe src="' . $url . '" style="width:500px; height:215px; overflow:hidden; border:none; margin:auto; display:block;" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
        break;
}
if ($iframe):
    echo $iframe;
    $quoteId = $this->GetQuoteId();
    $url = Mage::getUrl('bitcoin/index/ipn/');
    ?>
<script type="text/javascript">
     function invoiceListener(event) {
        if (event.origin != "https://yolanda-perkins-stage.herokuapp.com/") {
          alert("Received message from unexpected domain: " + event.origin);
          return;
        }
        if (event.data === "unconfirmed") {
            buttons = $$("button.btn-checkout");
            buttons.each(function(btn) { btn.click(); })
         }else{
             alert("unknown order status :" + event.data);
         }
      }
      // Attach the message listener
      if (window.addEventListener) {
        addEventListener("message", invoiceListener, false)
      } else {
        attachEvent("onmessage", invoiceListener)
      }
</script> <commit_msg>remove the extra /<commit_after><?php
$url = $this->GetWidgetUrl();
$iframe = false;
switch ($url) {
    case 'nopayment':
    case 'disabled':
        break;
    case 'paid':
        echo 'Order payment received.  Place Order to complete.';
        break;
    case false:
        echo 'Error creating invoice. Please try again or try another payment solution.';
        break;
    default:
        $iframe = '<iframe src="' . $url . '" style="width:500px; height:215px; overflow:hidden; border:none; margin:auto; display:block;" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
        break;
}
if ($iframe):
    echo $iframe;
    $quoteId = $this->GetQuoteId();
    $url = Mage::getUrl('bitcoin/index/ipn/');
    ?>
<script type="text/javascript">
     function invoiceListener(event) {
        if (event.origin != "https://yolanda-perkins-stage.herokuapp.com") {
          alert("Received message from unexpected domain: " + event.origin);
          return;
        }
        if (event.data === "unconfirmed") {
            buttons = $$("button.btn-checkout");
            buttons.each(function(btn) { btn.click(); })
         }else{
             alert("unknown order status :" + event.data);
         }
      }
      // Attach the message listener
      if (window.addEventListener) {
        addEventListener("message", invoiceListener, false)
      } else {
        attachEvent("onmessage", invoiceListener)
      }
</script> 
{'fraction_non_alphanumeric': 0.1489655172413793, 'fraction_numerical': 0.004827586206896552, 'mean_word_length': 2.5464547677261615, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5627725', 'n_tokens_mistral': 856, 'n_tokens_neox': 815, 'n_words': 205}