<commit_before>// TODO in reality, cardMove.js configures the context menu: move it in its own Behavior

window.setTimeout(function() {
			// Show menu when #myDiv is clicked
			jQuery("#card${uuidValidForJs}").contextMenu(
					{
						menu : 'contextMenu${uuidValidForJs}'
					},
					function(action, el, pos) {
						var uuid = jQuery(el).attr('id').replace('card', '');
						
						if (action === 'graveyard') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							Wicket.Ajax.get({ 'u' : '${graveyardUrl}&uuid=' + uuid });
						} else if (action === 'hand') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							Wicket.Ajax.get({ 'u' : '${handUrl}&uuid=' + uuid });
						} else if (action === 'exile') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							var url = jQuery('#handleImage' + uuid).data('exileUrl');
							Wicket.Ajax.get({ 'u' : url + '&uuid=' + uuid });
						} else if (action === 'move') {
                            var body = document.getElementById('body');
                            body.style.cursor='move';
                            jQuery("body").click(function(event) {
                                var url = jQuery('#handleImage' + uuid).data('dragUrl');
                                body.style.cursor="default";
                                Wicket.Ajax.get({ 'u' : url + '&uuid=' + uuid + '&posX=' + event.pageX + '&posY=' + event.pageY});
                                jQuery("body").unbind('click');
                            });
                        } else if (action === 'destroy') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							Wicket.Ajax.get({ 'u' : '${destroyUrl}&uuid=' + uuid });
						}
					}
			);
            jQuery('#cardHandle${uuidValidForJs}').attr('style', 'display: block; position: absolute; left: ${posX}px; top: ${posY}px; z-index: 1;');
            
			function getViewPortSize() {
			    if (typeof window.innerWidth != 'undefined')
			    {
			    	window.viewportwidth = window.innerWidth,
			    	window.viewportheight = window.innerHeight;
			    }
			}
			
			getViewPortSize();
			var card = jQuery('#card${uuidValidForJs}');
			if (viewportwidth > 1024) {
				if (typeof card != 'undefined' && card.attr('src').indexOf('_small') != -1) {
					card.attr('src', card.attr('src').replace('_small', '_medium')); 
				}
			} else {
				if  (typeof card != 'undefined' && card.attr('src').indexOf('_medium') != -1) {	
						card.attr('src', card.attr('src').replace('_medium', '_small')); 
				}
			}
}, 500);
<commit_msg>FIXED play card<commit_after>// TODO in reality, cardMove.js configures the context menu: move it in its own Behavior

window.setTimeout(function() {
			// Show menu when #myDiv is clicked
			jQuery("#card${uuidValidForJs}").contextMenu(
					{
						menu : 'contextMenu${uuidValidForJs}'
					},
					function(action, el, pos) {
						var uuid = jQuery(el).attr('id').replace('card', '');
						
						if (action === 'graveyard') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							Wicket.Ajax.get({ 'u' : '${graveyardUrl}&uuid=' + uuid });
						} else if (action === 'hand') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							Wicket.Ajax.get({ 'u' : '${handUrl}&uuid=' + uuid });
						} else if (action === 'exile') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							var url = jQuery('#handleImage' + uuid).data('exileUrl');
							Wicket.Ajax.get({ 'u' : url + '&uuid=' + uuid });
						} else if (action === 'move') {
                            var body = document.getElementById('body');
                            body.style.cursor='move';
                            jQuery("body").click(function(event) {
                                var url = jQuery('#handleImage' + uuid).data('dragUrl');
                                body.style.cursor="default";
                                Wicket.Ajax.get({ 'u' : url + '&uuid=' + uuid + '&posX=' + event.pageX + '&posY=' + event.pageY});
                                jQuery("body").unbind('click');
                            });
                        } else if (action === 'destroy') {
							jQuery('#' + jQuery(el).attr('id').replace('card', 'cardHandle')).hide();
							Wicket.Ajax.get({ 'u' : '${destroyUrl}&uuid=' + uuid });
						}
					}
			);
            jQuery('#cardHandle${uuidValidForJs}').attr('style', 'display: block; position: absolute; left: ${posX}px; top: ${posY}px; z-index: 1;');
            
			function getViewPortSize() {
			    if (typeof window.innerWidth != 'undefined')
			    {
			    	window.viewportwidth = window.innerWidth,
			    	window.viewportheight = window.innerHeight;
			    }
			}
			
			getViewPortSize();
			var card = jQuery('#card${uuidValidForJs}');
			if (viewportwidth > 1024) {
				if (typeof card != 'undefined' && typeof card.attr('src') != 'undefined' &&card.attr('src').indexOf('_small') != -1) {
					card.attr('src', card.attr('src').replace('_small', '_medium')); 
				}
			} else {
				if  (typeof card != 'undefined' && typeof card.attr('src') != 'undefined' && card.attr('src').indexOf('_medium') != -1) {	
						card.attr('src', card.attr('src').replace('_medium', '_small')); 
				}
			}
}, 500);

{'fraction_non_alphanumeric': 0.20292538418811332, 'fraction_numerical': 0.0037030179596371044, 'mean_word_length': 2.281895504252734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3960751', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1633, 'n_words': 310}