<commit_before><%!
   from r2.lib.filters import scriptsafe_dumps
   from reddit_adzerk.lib import config
%>

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>ad</title>
  <style>
    body {
      margin: 0;
    }

    .discuss-ad {
      color: #369;
      display: block;
      font-family: verdana, arial, sans-serif;
      font-size: small;
      text-decoration: none;
      text-align: center;
    }
  </style>
  <script>
    window.ADS_GLOBALS = ${scriptsafe_dumps(config.get_js_config())};
    window.ados = window.ados || {};
    ados.run = ados.run || [];

    var script = document.createElement('script');
    script.src = '//static.adzerk.net/ados.js';
    script.async = true;
    document.getElementsByTagName('head')[0].appendChild(script);
  </script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
${self.content()}
</body>
</html>

<%def name="content()"></%def>
<%def name="discuss(frame, placement)">
  <script>
    (function() {
      var timeout = setInterval(function() {
        var frame = ${scriptsafe_dumps(frame)};
        var placement = ${scriptsafe_dumps(placement)};

        if (window.parent.frames[frame].ados_ads) {
          clearInterval(timeout);

          var id = window.parent.frames[frame].ados_ads[placement].id;
          var discussLink = document.createElement('a');
          var adzerkPreview = 'https://preview.adzerk.net/preview/' + id;

          discussLink.className = 'discuss-ad';
          discussLink.target = 'top';
          discussLink.href = '//reddit.com/r/ads/submit?url=' + encodeURIComponent(adzerkPreview);<commit_msg>Fix ssl for preview links<commit_after><%!
   from r2.lib.filters import scriptsafe_dumps
   from reddit_adzerk.lib import config
%>

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>ad</title>
  <style>
    body {
      margin: 0;
    }

    .discuss-ad {
      color: #369;
      display: block;
      font-family: verdana, arial, sans-serif;
      font-size: small;
      text-decoration: none;
      text-align: center;
    }
  </style>
  <script>
    window.ADS_GLOBALS = ${scriptsafe_dumps(config.get_js_config())};
    window.ados = window.ados || {};
    ados.run = ados.run || [];

    var script = document.createElement('script');
    script.src = '//static.adzerk.net/ados.js';
    script.async = true;
    document.getElementsByTagName('head')[0].appendChild(script);
  </script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
${self.content()}
</body>
</html>

<%def name="content()"></%def>
<%def name="discuss(frame, placement)">
  <script>
    (function() {
      var timeout = setInterval(function() {
        var frame = ${scriptsafe_dumps(frame)};
        var placement = ${scriptsafe_dumps(placement)};

        if (window.parent.frames[frame].ados_ads) {
          clearInterval(timeout);

          var id = window.parent.frames[frame].ados_ads[placement].id;
          var discussLink = document.createElement('a');
          var adzerkPreview = 'https://preview.adzerk.com/preview/' + id;

          discussLink.className = 'discuss-ad';
          discussLink.target = 'top';
          discussLink.href = '//reddit.com/r/ads/submit?url=' + encodeURIComponent(adzerkPreview);
{'fraction_non_alphanumeric': 0.16676700782661047, 'fraction_numerical': 0.006020469596628537, 'mean_word_length': 2.970131421744325, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '660078', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1095, 'n_words': 193}