<commit_before>// ==UserScript==
// @name            IPTorrents - Time Until Spend Bonus Points
// @namespace       http://github.com/taeram/user-scripts
// @description     Calculate the number of days until you should redeem your bonus points for 10GB credit
// @match           https://www.iptorrents.com/*
// @match           https://iptorrents.com/*
// @grant           none
// @copyright       <NAME>
// @version         1.2.1
// @license         MIT https://github.com/taeram/user-scripts/blob/master/LICENSE
// @updateURL       https://raw.github.com/taeram/user-scripts/master/iptorrents-time-until-spend-bonus-points.user.js
// @downloadURL     https://raw.github.com/taeram/user-scripts/master/iptorrents-time-until-spend-bonus-points.user.js
// ==/UserScript==

(function() {
    'use strict';

    var secondsPerBonusPoint = (60 * 30); // One bonus point every 30 minutes
    var bonusPointsEl = $('.fa-gift').parents('a');
    var bonusPoints = bonusPointsEl.text().replace(/\s/, '');
    var secondsUntilOneThousandBonusPoints = (1000 - bonusPoints) * secondsPerBonusPoint;

    // Calculate when we can redeem the bonus points
    var date = new Date();
    date.setTime(date.getTime() + secondsUntilOneThousandBonusPoints * 1000);

    bonusPointsEl.after(' (Redeem on ' + date.toDateString()  + ')');
})();<commit_msg>More waiting until page load<commit_after>// ==UserScript==
// @name            IPTorrents - Time Until Spend Bonus Points
// @namespace       http://github.com/taeram/user-scripts
// @description     Calculate the number of days until you should redeem your bonus points for 10GB credit
// @match           https://www.iptorrents.com/*
// @match           https://iptorrents.com/*
// @grant           unsafeWindow
// @copyright       <NAME>
// @version         1.2.2
// @license         MIT https://github.com/taeram/user-scripts/blob/master/LICENSE
// @updateURL       https://raw.github.com/taeram/user-scripts/master/iptorrents-time-until-spend-bonus-points.user.js
// @downloadURL     https://raw.github.com/taeram/user-scripts/master/iptorrents-time-until-spend-bonus-points.user.js
// ==/UserScript==

(function() {
    'use strict';

    // Wait for jQuery to finish loading
    var jQueryInterval = setInterval(function () {
        if (typeof unsafeWindow['$'] !== 'undefined') {
            clearInterval(jQueryInterval);
            main();
        }
    }, 100);

    function main () {
        var secondsPerBonusPoint = (60 * 30); // One bonus point every 30 minutes
        var bonusPointsEl = $('.fa-gift').parents('a');
        var bonusPoints = bonusPointsEl.text().replace(/\s/, '');
        var secondsUntilOneThousandBonusPoints = (1000 - bonusPoints) * secondsPerBonusPoint;

        // Calculate when we can redeem the bonus points
        var date = new Date();
        date.setTime(date.getTime() + secondsUntilOneThousandBonusPoints * 1000);

        bonusPointsEl.after(' (Redeem on ' + date.toDateString()  + ')');
    }
})();
{'fraction_non_alphanumeric': 0.14610498161150118, 'fraction_numerical': 0.013707790036776997, 'mean_word_length': 2.6443361753958587, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2267082', 'n_tokens_mistral': 943, 'n_tokens_neox': 888, 'n_words': 198}