[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ai_contents_lists.js
(function ($) { "use strict"; $('body').on('click', '.js-view-content', function (e) { e.preventDefault(); const $parent = $(this).parent(); const prompt = $parent.find('.js-prompt').val() ?? null; let result = $parent.find('.js-result').val(); const $modal = $('#contentModal'); const $prompt = $modal.find('.js-prompt-card'); $prompt.addClass('d-none'); if (prompt && prompt !== '') { $prompt.removeClass('d-none'); $prompt.find('p').text(prompt) } const $textCard = $modal.find('#generatedTextContents'); const $imageCard = $modal.find('.js-image-generated-modal'); $textCard.addClass('d-none'); $imageCard.addClass('d-none'); const $imageCardContent = $imageCard.find('.js-content-modal'); $imageCardContent.html(''); if (result) { result = JSON.parse(result); if (result.contents && Object.keys(result.contents).length) { $textCard.removeClass('d-none'); for (const content of result.contents) { const html = makeTextContentHtml(content); $textCard.append(html); } } if (result.images && Object.keys(result.images).length) { $imageCard.removeClass('d-none'); for (const image of result.images) { const html = `<a href="${image}" target="_blank" class="d-block image-generated-card"> <img src="${image}" alt="image" class="img-cover rounded-sm"> </a>`; $imageCardContent.append(html); } } } $modal.modal('show'); }); function makeTextContentHtml(text) { return `<div class="js-text-generated mt-20 p-15 bg-info-light border-gray300 rounded-sm"> <div class="d-flex align-items-center justify-content-between"> <h4 class="font-14 text-gray">${generatedContentLang}</h4> <div class="form-group mb-0"> <button type="button" class="btn-transparent d-flex align-items-center js-copy-content-modal" data-toggle="tooltip" data-placement="top" title="${copyLang}" data-copy-text="${copyLang}" data-done-text="${doneLang}"> <i data-feather="copy" width="18" height="18" class="text-gray"></i> <span class="text-gray font-12 ml-5">${copyLang}</span> </button> </div> </div> <div class="mt-15 font-14 text-gray js-content">${text}</div> </div>` } var copyTimeout; $('body').on('click', '.js-copy-content-modal', function (e) { e.preventDefault(); const $this = $(this); const copyText = $this.attr('data-copy-text'); const doneText = $this.attr('data-done-text'); const contentToCopy = $this.closest('.js-text-generated').find('.js-content').text(); const tempTextarea = $('<textarea>').val(contentToCopy).appendTo('body').select(); document.execCommand('copy'); // Remove the temporary textarea tempTextarea.remove(); const $span = $this.find('span') $span.text(doneText); if (copyTimeout) { clearTimeout(copyTimeout) } copyTimeout = setTimeout(() => { $span.text(copyText); }, 1500) }); })(jQuery);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285