<commit_before>// PLUGIN: Timeline
(function (Popcorn) {

  /**
   * googlefeed popcorn plug-in
   * Adds a feed from the specified blog url at the target div
   * Options parameter will need a start, end, target, url and title
   * -Start is the time that you want this plug-in to execute
   * -End is the time that you want this plug-in to stop executing
   * -Target is the id of the DOM element that you want the map to appear in. This element must be in the DOM
   * -Url is the url of the blog's feed you are trying to access
   * -Title is the title of the blog you want displayed above the feed
   * -Orientation is the orientation of the blog, accepts either Horizontal or Vertical, defaults to Vertical
   * @param {Object} options
   *
   * Example:
    var p = Popcorn("#video")
      .googlefeed({
       start: 5, // seconds
       end: 15, // seconds
       target: "map",
       url: "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml",
       title: "Planet Feed"
    } )
  *
  */

  var i = 0;
   
    var head = document.getElementsByTagName("head")[0];
    var css = document.createElement('link');
    css.type = "text/css";
    css.rel = "stylesheet";
    css.href =  "asdf.css";
    head.insertBefore( css, head.firstChild ); 


  Popcorn.plugin( "timeline" , function( options ) {
    // create a new div and append it to the parent div so nothing
    // that already exists in the parent div gets overwritten
    var newdiv = document.createElement( "div" );
    newdiv.style.display = "none";
    newdiv.id = "asdf"+i;

    if ( document.getElementById( options.target ) ) {
      document.getElementById( options.target ).appendChild( newdiv );
      // if this isnt the first div added to the target div
      if( i ){
        // insert the current div before the previous div inserted
        document.getElementById( options.target ).insertBefore( newdiv, document.getElementById( "asdf" + ( i - 1 ) ) );
       }
    }
    
    i++;
    
    newdiv.innerHTML = "<p><span id='big'>" + options.title + "</span><br />" +
    "<span id='mid'>" + options.text + "<br />" +
"</span><a href='#'>" + options.links + "</a></p>";
    
    return {
      /**
       * @member webpage
       * The start function will be executed when the currentTime
       * of the video reaches the start time provided by the
       * options variable
       */
      start: function( event, options ){
        newdiv.setAttribute( "style", "display:block" );       
      },
      /**
       * @member webpage
       * The end function will be executed when the currentTime
       * of the video reaches the end time provided by the
       * options variable
       */<commit_msg>Adding stuff for clicking div<commit_after>// PLUGIN: Timeline
(function (Popcorn) {

  /**
   * googlefeed popcorn plug-in
   * Adds a feed from the specified blog url at the target div
   * Options parameter will need a start, end, target, url and title
   * -Start is the time that you want this plug-in to execute
   * -End is the time that you want this plug-in to stop executing
   * -Target is the id of the DOM element that you want the map to appear in. This element must be in the DOM
   * -Url is the url of the blog's feed you are trying to access
   * -Title is the title of the blog you want displayed above the feed
   * -Orientation is the orientation of the blog, accepts either Horizontal or Vertical, defaults to Vertical
   * @param {Object} options
   *
   * Example:
    var p = Popcorn("#video")
      .googlefeed({
       start: 5, // seconds
       end: 15, // seconds
       target: "map",
       url: "http://zenit.senecac.on.ca/~chris.tyler/planet/rss20.xml",
       title: "Planet Feed"
    } )
  *
  */

  var i = 0,
      that = this;
   
    var head = document.getElementsByTagName("head")[0];
    var css = document.createElement('link');
    css.type = "text/css";
    css.rel = "stylesheet";
    css.href =  "asdf.css";
    head.insertBefore( css, head.firstChild ); 


  Popcorn.plugin( "timeline" , function( options ) {
    // create a new div and append it to the parent div so nothing
    // that already exists in the parent div gets overwritten
    var newdiv = document.createElement( "div" );
    newdiv.style.display = "none";
    newdiv.id = "asdf"+i;
    
    if ( document.getElementById( options.target ) ) {
      document.getElementById( options.target ).appendChild( newdiv );
      // if this isnt the first div added to the target div
      if( i ){
        // insert the current div before the previous div inserted
        document.getElementById( options.target ).insertBefore( newdiv, document.getElementById( "asdf" + ( i - 1 ) ) );
       }
    }
    
    i++;
    
    newdiv.innerHTML = "<p><span id='big'>" + options.title + "</span><br />" +
    "<span id='mid'>" + options.text + "<br />" +
"</span><a href='#'>" + options.links + "</a></p>";

    // adding eventlistener to each div, so when its clicked it will go to divs start time
    newdiv.addEventListener( "click", function () {
      that.currentTime( options.start );
    }, false );
    
    document.links.addEventListener( "click", function () {
    }, false );
    
    return {
      /**
       * @member webpage
       * The start function will be executed when the currentTime
       * of the video reaches the start time provided by the
       * options variable
       */
      start: function( event, options ){
        newdiv.setAttribute( "style", "display:block" );       
      },
      /**
       * @member webpage
       * The end function will be executed when the currentTime
       * of the video reaches the end time provided by the
       * options variable
       */
{'fraction_non_alphanumeric': 0.11371999299106361, 'fraction_numerical': 0.0028035745575608903, 'mean_word_length': 2.4118350268977884, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1195844', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1614, 'n_words': 624}