Soyjak.Party / The Sharty - The altchan born from the ashes of /qa/; also a containment thread

Swole Bull’s™ Full Null-Hole & Sprongle Dongle Ensemble
Featuring: Itty-Bitty Clitty-Spitty
AR Sex Toy & Lube

"Sping, spong, splooge, unleash the deluge!"

Does your prickly pringle crave cheesy-dough-boy greasy hole, boy?

Want itty-bitty clitty spitty on your Diddy-pittie?

Then you need Swole Bull’s Full Null-Hole & Sprongle Dongle Ensemble - Featuring: Itty-Bitty Clitty-Spitty.

Swole Bull's: Sping, spong, splooge, unleash the deluge!
 
>Gigaquoting on the Kiwifarms
gigastupidsingstopenguins.gif
 
1763710194181.png
why it say niggers

JavaScript:
/**
 * Override for XF.Editor to change pasted image behavior
 * Changes auto-embedded images to use thumbnails instead of full size
 * Videos remain full resolution as desired
 * Works without jQuery dependency
 *
 * Author: The Sloppiest AI Slopmeister in the West
 */
(function (window, document) {
    'use strict';

    // Wait for XF.Editor to be available
    const initOverride = function () {
        if (typeof XF === 'undefined' || typeof XF.Editor === 'undefined') {
            setTimeout(initOverride, 100);
            return;
        }

        // Store the original setupUploads method
        const originalSetupUploads = XF.Editor.prototype.setupUploads;

        // Override the setupUploads method to inject our custom paste handlers
        XF.Editor.prototype.setupUploads = function () {
            const t = this;
            const ed = this.ed;

            // Custom handler for when images/videos are inserted (including from paste)
            const customMediaInsert = function (el, response) {
                if (!response) {
                    return;
                }

                let json;
                try {
                    json = JSON.parse(response);
                } catch (e) {
                    return;
                }

                // Handle Froala jQuery-wrapped elements
                let $el = el;
                let actualEl = el;

                // Check if this is a Froala jQuery object and get the actual element
                if (el && el[0]) {
                    actualEl = el[0];
                }

                // Handle video elements - videos should remain full resolution
                if (actualEl.classList && actualEl.classList.contains('fr-video')) {
                    const videoEl = actualEl.querySelector('video');
                    if (videoEl) {
                        videoEl.setAttribute('data-xf-init', 'video-init');
                        videoEl.setAttribute('style', '');
                        videoEl.innerHTML = '';
                        actualEl = videoEl;
                        $el = ed.$(videoEl);
                    }
                }

                if (json.attachment) {
                    const id = json.attachment.attachment_id;
                    const isImage = actualEl.tagName === 'IMG';
                    const isVideo = actualEl.tagName === 'VIDEO';

                    // Clean up data attributes from JSON response
                    const attrs = actualEl.attributes;
                    const re = /^data-(?!xf-init)/;
                    for (let i = attrs.length - 1; i >= 0; i--) {
                        if (re.test(attrs[i].nodeName)) {
                            actualEl.removeAttribute(attrs[i].nodeName);
                        }
                    }

                    // Key behavior change:
                    // - Images: Use 'thumb:' to force thumbnail insertion (no [ATTACH=full] tags)
                    // - Videos: Use 'full:' to maintain full resolution
                    if (isImage) {
                        actualEl.setAttribute('data-attachment', 'thumb:' + id);

                        // Remove size attributes that might force full-size display
                        actualEl.removeAttribute('data-size');
                        if (actualEl.hasAttribute('size')) {
                            actualEl.removeAttribute('size');
                        }

                        // Apply thumbnail constraints immediately
                        const maxDim = (XF.config && XF.config.attachmentThumbnailDimensions) || 250;
                        actualEl.style.maxWidth = maxDim + 'px';
                        actualEl.style.maxHeight = maxDim + 'px';
                        actualEl.style.width = 'auto';
                        actualEl.style.height = 'auto';

                        // Return false to prevent the original handler from running for images
                        return false;
                    } else if (isVideo) {
                        // Videos remain full resolution as requested
                        actualEl.setAttribute('data-attachment', 'full:' + id);
                        // Let the original handler run for videos
                    } else {
                        // Fallback - use thumb for safety
                        actualEl.setAttribute('data-attachment', 'thumb:' + id);
                        return false;
                    }
                }
            };

            // Custom image loaded handler to enforce thumbnail sizing
            const customImageLoaded = function ($img) {
                let imgEl = $img;
                if ($img && $img[0]) {
                    imgEl = $img[0];
                }

                // Check if this is a thumbnail image (data-attachment starts with 'thumb:')
                const attachmentAttr = imgEl.getAttribute('data-attachment');
                if (attachmentAttr && attachmentAttr.startsWith('thumb:')) {
                    // Get XenForo's thumbnail dimensions
                    const maxDim = (XF.config && XF.config.attachmentThumbnailDimensions) || 250;

                    // Get natural dimensions
                    const naturalWidth = imgEl.naturalWidth || imgEl.width;
                    const naturalHeight = imgEl.naturalHeight || imgEl.height;

                    // Calculate scaling to fit within thumbnail constraints
                    let scale = 1;
                    if (naturalWidth > maxDim || naturalHeight > maxDim) {
                        scale = Math.min(maxDim / naturalWidth, maxDim / naturalHeight);
                    }

                    const finalWidth = Math.round(naturalWidth * scale);
                    const finalHeight = Math.round(naturalHeight * scale);

                    // Apply thumbnail constraints
                    imgEl.style.maxWidth = finalWidth + 'px';
                    imgEl.style.maxHeight = finalHeight + 'px';
                    imgEl.style.width = 'auto';
                    imgEl.style.height = 'auto';

                    // Set data-size to thumbnail dimensions
                    imgEl.setAttribute('data-size', `${finalWidth}x${finalHeight}`);

                    // Prevent image edit popup for thumbnails
                    if (ed.popups && ed.popups.isVisible && ed.popups.isVisible('image.edit')) {
                        ed.image.exitEdit(true);
                    }

                    // Return false to prevent other handlers
                    return false;
                }
            };

            // Register our handlers with high priority (run first)
            ed.events.on('image.inserted video.inserted', customMediaInsert, true);
            ed.events.on('image.replaced video.replaced', customMediaInsert, true);
            ed.events.on('image.loaded', customImageLoaded, true);

            // Call original setupUploads to add remaining handlers
            originalSetupUploads.call(this);
        };

        console.log('XF.Editor paste image override loaded - images use thumbnails, videos remain full resolution');
    };

    // Initialize when DOM is ready
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initOverride);
    } else {
        initOverride();
    }

})(window, document);
 
>wants to make site more multicultural by growing the international aspect of it
>bans people for attempting to do so

Ver archivo adjunto 8197328
Xe moved it to spergatory btw
 
Atrás
Top Abajo