<?php
    require dirname( __FILE__ ) . '/../../../../../wp-load.php';
    load_plugin_textdomain( 'amazilon', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
    header( 'Content-type: text/javascript' );
?>
tinymce.PluginManager.add('amazilon', function(editor, url) {
    editor.addButton('amazilon-generators', {
        text: ' <?php echo esc_attr( __( 'Amazilon', 'amazilon' ) ); ?>',
        icon: 'amazilon',
        onclick: function() {
            tb_show( '<?php echo esc_attr( __( 'Amazilon', 'amazilon' ) ); ?>', '<?php echo admin_url( 'admin.php?page=amazilon-generators&mini=true&fieldId=_mce&TB_iframe=true' ); ?>');
        }
    });
});
