您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add clickable link on comment date
当前为
// ==UserScript== // @name LZTCommentLink // @namespace MeloniuM/LZT // @version 1.2 // @description Add clickable link on comment date // @author MeloniuM // @license MIT // @match http*://zelenka.guru/threads/* // @match http*://lolz.live/threads/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { 'use strict'; function addLink(elem){ const link = location.origin + location.pathname + '#' + $(elem).closest('.comment').attr('id'); $(elem).wrap('<a href="' + link + '" class="item messageDateInBottom datePermalink" style="display: inline; margin-left: 0;" data-phr="Ссылка скопирована"></a>'); $(elem).on('click', function(event){ event.preventDefault(); const $target = $(event.target).closest('a.messageDateInBottom'); Clipboard.copy(encodeURI($target[0].href), $target[0]); }); } //скроллинг до комментария и анимация при загрузке страницы if (location.hash != ''){ var $scrollTo = $(location.hash); if ($scrollTo.length){ $scrollTo.get(0).scrollIntoView(); XenForo.animateBackgroundColor($scrollTo); } } $(document).ready(function(){ $('.comment abbr.DateTime:not(a abbr.DateTime)').each(function(index){ addLink(this); }); }); $('.thread_view').on('DOMNodeInserted', function(event) {//при добавлении комментария if (!$(event.target).is('.comment')) return; $(event.target).find('abbr.DateTime:not(a abbr.DateTime)').each(function(index){ addLink(this); }); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址