<commit_before>define("loadLyndaAd", ["enquire"], function(enquire) {
  
  var loadLyndaAd = function() {
    var adBox = document.getElementById("aside-ad-section"),
      frag = document.createDocumentFragment(),
      adLink = document.createElement("a"),
      adImg = document.createElement("img");
    
    // set attributes for form
    adImg.setAttribute("src", "http://affiliates.lynda.com/42/2146/11593/");
    adLink.setAttribute("href", "http://www.lynda.com/Programming-Foundations-training-tutorials/1351-0.html?utm_medium=ldc-partner&utm_source=SSPRC&utm_content=11593&utm_campaign=CD2146&bid=11593&aid=CD2146&opt=");

    // Arrange elements
    adLink.appendChild(adImg);

    // Load arranged elements into document fragment
    frag.appendChild(adLink);

    adBox.appendChild(frag);
  }

  // enquire.js code
  enquire.register("screen and (max-width: 400px)", {
    match : function() {
      console.log("hello");
    },
                       
    unmatch : function() {
      console.log("goodbye");
    }
  });                            
});<commit_msg>get enquire.js code working before documenting w/ comments<commit_after>define("loadLyndaAd", ["enquire"], function(enquire) {
  
  var loadLyndaAds = function() {
    var adBox = document.getElementById("aside-ad-section"),
      frag = document.createDocumentFragment(),
      adLink = document.createElement("a"),
      adImg = document.createElement("img");
    
    // set attributes for ad
    adLink.setAttribute("href", "http://www.lynda.com/Programming-Foundations-training-tutorials/1351-0.html?utm_medium=ldc-partner&utm_source=SSPRC&utm_content=11593&utm_campaign=CD2146&bid=11593&aid=CD2146&opt=");

    // set attributes for ad image
    adImg.src = "http://affiliates.lynda.com/42/2146/11593/";
    adImg.border = "0";
    adImg.width = "200";
    adImg.height = "200";

    // Arrange elements
    adLink.appendChild(adImg);

    // Load arranged elements into document fragment
    frag.appendChild(adLink);

    adBox.appendChild(frag);
  }

  // enquire.js code
  enquire.register("only screen and (min-width: 569px)", {

    deferSetup : true,

    setup : function() {
      loadLyndaAds();
    },

    match : function() {
      document.getElementById("aside-ad-section").style.display="block";
      
    },
    unmatch : function() {
      document.getElementById("aside-ad-section").style.display="none";
    }  


  });                            
});
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.03296703296703297, 'mean_word_length': 3.056105610561056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1630322', 'n_tokens_mistral': 846, 'n_tokens_neox': 763, 'n_words': 116}