您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Расширение позволяет копировать соддержимое хайда по кнопке
当前为
// ==UserScript== // @name LZTHideCopyButton // @namespace MeloniuM/LZT // @version 2.1 // @description Расширение позволяет копировать соддержимое хайда по кнопке // @author MeloniuM // @license MIT // @match *://zelenka.guru/threads/* // @match *://lolz.guru/threads/* // @match *://lolz.live/threads/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { 'use strict'; function addButton(elem) { if (!(elem instanceof HTMLElement)) return; if (elem.querySelector('.attribution.type i.HideCopy')) return; let i = document.createElement('i') i.setAttribute('class', 'fa--xf far fa-paste HideCopy') i.setAttribute('data-phr', 'Содержимое было скопировано в буфер обмена') i.setAttribute('aria-hidden', 'true') i.style.marginLeft = '5px' elem.appendChild(i) } $( document ).ready(function() {//при загрузке $('.bbCodeBlock.bbCodeQuote.bbCodeHide').each(function( index ) { addButton($( this ).find('.attribution.type')[0]) }); }); $('.messageList').on('DOMNodeInserted', function(event) {//при добавлении сообщения $(event.target).find('.bbCodeBlock.bbCodeQuote.bbCodeHide').each(function( index ) { addButton($( this ).find('.attribution.type')[0]) }); }); $('.bbCodeBlock.bbCodeQuote.bbCodeHide .attribution.type .HideCopy').on('click', function(event) {//при клике let quote = $(event.target).closest('.bbCodeBlock.bbCodeQuote.bbCodeHide').find('.quote')[0] var range = document.createRange(); range.selectNode(quote); window.getSelection().removeAllRanges(); window.getSelection().addRange(range); document.execCommand('copy'); event.target.classList.add("animated"); animateCSS(event.target, ["heartBeat", "mainc"]); XenForo.alert(event.target.getAttribute("data-phr"), "", 5e3); }) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址