您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enable text copying on restricted websites
当前为
- // ==UserScript==
- // @name Text Copy Enabler
- // @name:ja Text Copy Enabler
- // @namespace http://tampermonkey.net/
- // @version 1.3
- // @description Enable text copying on restricted websites
- // @description:ja 制限された Web サイトでのテキストのコピーを有効にします
- // @author Tonikkl
- // @match https://www.oricon.co.jp/prof/*/lyrics/*/
- // @match https://www.uta-net.com/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- if (window.location.href.indexOf('www.oricon.co.jp') > -1) {
- // Override CSS properties to enable text selection
- var styleOricon = document.createElement('style');
- styleOricon.innerHTML = '.all-lyrics { user-select: text !important; -webkit-user-select: text !important; }';
- document.head.appendChild(styleOricon);
- // Remove the oncontextmenu, onmousedown, and onselectstart attributes
- var elements = document.querySelectorAll('.all-lyrics');
- for (var i = 0; i < elements.length; i++) {
- elements[i].removeAttribute('oncontextmenu');
- elements[i].removeAttribute('onmousedown');
- elements[i].removeAttribute('onselectstart');
- }
- }
- if (window.location.href.indexOf('www.uta-net.com') > -1) {
- // Override CSS properties to enable text selection and interaction
- var styleUtaNet = document.createElement('style');
- styleUtaNet.innerHTML = `
- .nocopy, .nocopy * {
- user-select: text !important;
- -webkit-user-select: text !important;
- pointer-events: auto !important;
- }
- `;
- document.head.appendChild(styleUtaNet);
- // Disable common event listeners which might prevent copying
- window.addEventListener('contextmenu', function(e) {
- e.stopPropagation();
- }, true);
- window.addEventListener('selectstart', function(e) {
- e.stopPropagation();
- }, true);
- window.addEventListener('mousedown', function(e) {
- e.stopPropagation();
- }, true);
- window.addEventListener('mouseup', function(e) {
- e.stopPropagation();
- }, true);
- }
- })();