您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add preview overlay to more links in the Zelenka.guru
// ==UserScript== // @name LZTLinkPreview // @namespace MeloniuM/LZT // @version 1.1 // @description Add preview overlay to more links in the Zelenka.guru // @author MeloniuM // @license MIT // @match http*://zelenka.guru/* // @match http*://lolz.live/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { 'use strict'; const selectors = [ '.forum_list .text_Ads',//в рекламе спика раздела '.thread_view',//в темах '.ImViewContent, .conversationMessages',//в диалогах '.profilePage .messageSimpleList',//в профиле ]; function addPreview(elem){ $(elem).addClass('PreviewTooltip'); const url = new URL(elem.href); $(elem).attr('data-previewurl', url.pathname.slice(1, -1) + '/preview'); XenForo.PreviewTooltip($(elem)); } $(document).ready(function(){ if (!$('div#PreviewTooltip').length){ $('.pageContent').append($('<div id="PreviewTooltip"><div class="previewContent"><span class="PreviewContents">Загрузка...</span></div></div>')); } $(selectors.join()).find('a[href$="/"]:not(.PreviewTooltip, [href*="?"])').filter('[href^="/threads/"], [href^="https://zelenka.guru/threads/"], [href^="https://lolz.live/threads/"]').each(function(index){ addPreview(this); }); }); $(selectors.join()).on('DOMNodeInserted', function(event) {//при добавлении сообщения //.find('a[href^="https://zelenka.guru/threads/"], a[href^="https://lolz.live/threads/]"').filter('a[href$="/"]:not(.PreviewTooltip)') $(event.target).find('a[href$="/"]:not(.PreviewTooltip, [href*="?"])').filter('[href^="https://zelenka.guru/threads/"], [href^="https://lolz.live/threads/"]').each(function( index ) { if ($(this).closest('.chat2-inputBox, .LolzteamEditorSimple').length) return; addPreview(this); }); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址