Sorry, easy-fancybox-class.php is not the correct file. You need to edit easy-fancybox-settings.php instead. It holds a large array with all the default options. Find (for example) the Youtube array which starts with:
'YouTube' => array(
'title' => __('YouTube','easy-fancybox'),
'input' => 'multiple',
'options' => array(
'intro' => array (
...
Now add an extra array key right between that 'options' => array
and the following 'intro' => array
like:
'onClosed' => array (
'noquotes' => true,
'default' => 'function() { $("body").append("<div id=\"thanks\" style=\"position:absolute;z-index:99999;background:red;color:black;top:10px;left:10px;padding:5px;\">Thanks for watching !</div>"); }'
),
(do not forget that comma at the end there)
Notes:
1. Please be aware that after the next plugin update, your modification will be gone!
2. You’ll have to do this for every media type if you want same (or similar) messages for all.