PageSourceSearch

https://essebot.ru/wp-content/plugins/ai_old/includes/projects/assets/js/word.js?ver=1791457802

js essebot.ru collected 2026-10-08 11:10:58 UTC 2,249 bytes, 42 lines download raw bytes

1jQuery(document).ready(function($) {
2	
3    $('#download-button-form, #download-button-down, #download-button-admin').on('click', function() {
4        var button = $(this);
5        button.prop('disabled', true); // Деактивируем кнопку
6        console.log('Кнопка нажата, отправка AJAX-запроса...');
7        var userId = $('#set_user_id').val() ? $('#set_user_id').val() : $('#user_id').text();
8        $.ajax({
9            url: '/wp-admin/admin-ajax.php',
10            type: 'POST',
11            data: {
12                action: 'generate_word_document',
13                postId: $('#post_id').text(), // Получаем ID проекта
14                userId: userId // Получаем ID пользователя
15            },
16            success: function(response) {
17                console.log('Ответ от сервера:', response);
18                if (response.success) {
19                    // Создаем временную ссылку для скачивания файла
20                    var link = document.createElement('a');
21                    link.href = response.data.file_url; // URL файла
22                    link.download = ''; // Устанавливаем атрибут download
23                    document.body.appendChild(link); // Добавляем ссылку в документ
24                    link.click(); // Инициализируем скачивание
25                    document.body.removeChild(link); // Удаляем ссылку из документа
26                    
27                    // Отправляем запрос на удаление файла
28
29                } else {
30                    $('#download-status').text(response.data.message);
31                }
32            },
33            error: function(jqXHR, textStatus, errorThrown) {
34                console.error('Ошибка AJAX:', textStatus, errorThrown);
35                $('#download-status').text('Произошла ошибка при загрузке файла.');
36            },
37            complete: function() {
38                button.prop('disabled', false); // Включаем кнопку обратно
39            }
40        });
41    });
42});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.