<commit_before>/**
 * Improved Bandcamp Scrobbler by <NAME>.
 *
 * - Build on the work of <NAME>
 * - Inspired by the Spotify scrobbler
 */

$(function() {
	'use strict';

	$(document).ready(function() {

		/**
		 * Audio player reference.
		 */
		var player = document.getElementsByTagName('audio')[0];

		/**
		 * Duration selector.
		 *
		 * @type {string}
		 */
		var durationPart = '.track_info .time';

		/**
		 * Duration regex.
		 *
		 * @type {string}
		 */
		var durationRegex = /[ \n]*(\d+):(\d+)[ \n]*\/[ \n]*(\d+):(\d+)[ \n]*/;

		/**
		 * Last playing track.
		 *
		 * @type {string}
		 */
		var lastTrack = null;

		/**
		 * If true then we are on a 'discovery' type of page.
		 *
		 * @type {boolean}
		 */
		var onDiscovery = $('#discover').length > 0;

		/**
		 * To determine whether the current page is an album.
		 *
		 * @type {boolean}
		 */
		var isAlbum = $('.trackView[itemtype="http://schema.org/MusicAlbum"]').length > 0;

		/**
		 * To determine whether the current page is a compilation or not.
		 *
		 * @type {Boolean}
		 */
		var isCompilation = isAlbum && allTracksDashed();

		console.log('BandCampScrobbler: Loaded! onDiscovery:' + onDiscovery + ' isAlbum:' + isAlbum + ' isCompilation:' + isCompilation);

		/**
		 * Initial bind of listeners.
		 */
		player.addEventListener('playing', scrobble);
		player.addEventListener('ended', reset);
		player.addEventListener('pause', reset);

		/**<commit_msg>Removed the pause event listener<commit_after>/**
 * Improved Bandcamp Scrobbler by <NAME>.
 *
 * - Build on the work of <NAME>
 * - Inspired by the Spotify scrobbler
 */

$(function() {
	'use strict';

	$(document).ready(function() {

		/**
		 * Audio player reference.
		 */
		var player = document.getElementsByTagName('audio')[0];

		/**
		 * Duration selector.
		 *
		 * @type {string}
		 */
		var durationPart = '.track_info .time';

		/**
		 * Duration regex.
		 *
		 * @type {string}
		 */
		var durationRegex = /[ \n]*(\d+):(\d+)[ \n]*\/[ \n]*(\d+):(\d+)[ \n]*/;

		/**
		 * Last playing track.
		 *
		 * @type {string}
		 */
		var lastTrack = null;

		/**
		 * If true then we are on a 'discovery' type of page.
		 *
		 * @type {boolean}
		 */
		var onDiscovery = $('#discover').length > 0;

		/**
		 * To determine whether the current page is an album.
		 *
		 * @type {boolean}
		 */
		var isAlbum = $('.trackView[itemtype="http://schema.org/MusicAlbum"]').length > 0;

		/**
		 * To determine whether the current page is a compilation or not.
		 *
		 * @type {Boolean}
		 */
		var isCompilation = isAlbum && allTracksDashed();

		console.log('BandCampScrobbler: Loaded! onDiscovery:' + onDiscovery + ' isAlbum:' + isAlbum + ' isCompilation:' + isCompilation);

		/**
		 * Initial bind of listeners.
		 */
		player.addEventListener('playing', scrobble);
		player.addEventListener('ended', reset);

		/**
{'fraction_non_alphanumeric': 0.17974772249474422, 'fraction_numerical': 0.002102312543798178, 'mean_word_length': 2.727154046997389, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '1320364', 'n_tokens_mistral': 1093, 'n_tokens_neox': 895, 'n_words': 242}