<commit_before>(function(jwplayer){

  // The initialization function, called on player setup.
  var template = function(player, config, div) {

    // normalize onUpdate callback
    var onUpdate = (function() {
        if(config.onUpdate && typeof config.onUpdate === 'function') {
            return config.onUpdate;
        }
        return function() {};
    })();

    var getPosition = function(element) {
        var bodyRect = document.body.getBoundingClientRect(),
            elemRect = element.getBoundingClientRect();
        return {x: elemRect.left - bodyRect.left, y: elemRect.top - bodyRect.top}
    }
<commit_msg>fixed again<commit_after>(function(jwplayer){

  // The initialization function, called on player setup.
  var template = function(player, config, div) {

    // normalize onUpdate callback
    var onUpdate = (function() {
        if(config.onUpdate && typeof config.onUpdate === 'function') {
            return config.onUpdate;
        }
        return function() {};
    })();

    var getPosition = function(element) {
        var top = 0, left = 0;
        do {
            top += element.offsetTop  || 0;
            left += element.offsetLeft || 0;
            element = element.offsetParent;
        } while(element);

        return {
            x: left,
            y: top            
        };
    };

{'fraction_non_alphanumeric': 0.11970260223048328, 'fraction_numerical': 0.002973977695167286, 'mean_word_length': 2.094252873563218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4793483', 'n_tokens_mistral': 369, 'n_tokens_neox': 355, 'n_words': 93}