您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
remove tistory copyright notation when copying content
// ==UserScript== // @name Tistory Copyright Remover // @namespace TCM_V1 // @version 1.0 // @description remove tistory copyright notation when copying content // @author Laria // @match https://*.tistory.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tistory.com // @grant none // @license MIT // @encoding utf-8 // @grant none // ==/UserScript== function copyWithSource (event) { const range = window.getSelection().getRangeAt(0); const contents = range.cloneContents(); const temp = document.createElement('div'); temp.appendChild(contents); event.clipboardData.setData('text/plain', temp.innerText); event.clipboardData.setData('text/html', '<pre data-ke-type="codeblock">' + temp.innerHTML + '</pre>'); event.preventDefault(); } document.addEventListener('copy', copyWithSource);