Всем привет Этот скрипт сделает видео в чате вместо ссылок. Видео обзор: Пример как без скрипта: Пример как с скриптом: // ==UserScript== // @name Embed Video Links on Forum // @namespace http://tampermonkey.net/ // @version 1.1 // @description Automatically embed video links as a full-featured video player on forums // @author Shibari // @match *://lolz.live/* // @match *://zelenka.guru/* // @match *://lolz.guru/* // @grant none // ==/UserScript== (function() { 'use strict'; function embedVideos() { const links = document.querySelectorAll('a'); links.forEach(link => { const url = link.href; if (link.classList.contains('video-embedded')) return; if (/(https?:\/\/.+\.(?:mp4|webm|ogg))/i.test(url)) { const video = document.createElement('video'); video.src = url; video.controls = true; video.style.maxWidth = '100%'; video.style.height = 'auto'; video.controlsList = 'nodownload'; link.replaceWith(video); } link.classList.add('video-embedded'); }); } embedVideos(); const observer = new MutationObserver(embedVideos); observer.observe(document.body, { childList: true, subtree: true }); })(); Code // ==UserScript== // @name Embed Video Links on Forum // @namespace http://tampermonkey.net/ // @version 1.1 // @description Automatically embed video links as a full-featured video player on forums // @author Shibari // @match *://lolz.live/* // @match *://zelenka.guru/* // @match *://lolz.guru/* // @grant none // ==/UserScript== (function() { 'use strict'; function embedVideos() { const links = document.querySelectorAll('a'); links.forEach(link => { const url = link.href; if (link.classList.contains('video-embedded')) return; if (/(https?:\/\/.+\.(?:mp4|webm|ogg))/i.test(url)) { const video = document.createElement('video'); video.src = url; video.controls = true; video.style.maxWidth = '100%'; video.style.height = 'auto'; video.controlsList = 'nodownload'; link.replaceWith(video); } link.classList.add('video-embedded'); }); } embedVideos(); const observer = new MutationObserver(embedVideos); observer.observe(document.body, { childList: true, subtree: true }); })();
ToSa, удобно для себя чтоб не открывать если захотят тоже поставят или dev уже сделает в чате такое по дефолту как с фото