您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
-
- // ==UserScript==
- // @name:ko 구글북스 복사 활성화
- // @name Google Books Allow copy
- // @namespace https://ndaesik.tistory.com/
- // @version 1
- // @description:ko -
- // @description -
- // @match *://play.google.com/books/*
- // @match *://books.googleusercontent.com/books/reader/frame*
- // @icon https://www.gstatic.com/images/branding/product/2x/play_books_96dp.png
- // @grant GM_setClipboard
- // @run-at document-idle
- // ==/UserScript==
- (function() {
- const isIframe = window.location.href.includes('books.googleusercontent.com/books/reader/frame');
- if (isIframe) {
- const style = document.createElement('style');
- style.textContent = `* {user-select: text !important} .overlay, .selection-overlay, .page-overlay {display: none !important}`;
- document.head.appendChild(style);
- document.addEventListener('copy', e => e.stopPropagation(), true);
- document.addEventListener('keydown', e => {
- if ((e.ctrlKey || e.metaKey) && e.key === 'c') {
- e.preventDefault();
- const text = window.getSelection().toString().trim();
- if (text) window.parent.postMessage({ type: 'COPY_TEXT', text }, '*');
- }
- }, true);
- } else {
- window.addEventListener('message', e => {
- if (e.data?.type === 'COPY_TEXT' && e.data.text) {
- GM_setClipboard(e.data.text);
- }
- });
- }
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址