Closed t2hv33 closed 9 years ago
(function(){var doc=document;var bd=doc.body;bd.onselectstart=bd.oncopy=bd.onpaste=bd.onkeydown=bd.oncontextmenu=bd.onmousemove=bd.onselectstart=bd.ondragstart=doc.onselectstart=doc.oncopy=doc.onpaste=doc.onkeydown=doc.oncontextmenu=null;doc.onselectstart=doc.oncontextmenu=doc.onmousedown=doc.onkeydown=function (){return true;};with(document.wrappedJSObject||document){onmouseup=null;onmousedown=null;oncontextmenu=null;}var arAllElements=document.getElementsByTagName('*');for(var i=arAllElements.length-1;i>=0;i--){var elmOne=arAllElements[i];with(elmOne.wrappedJSObject||elmOne){onmouseup=null;onmousedown=null;}}var head=document.getElementsByTagName('head')[0];if(head){var style=document.createElement('style');style.type='text/css';style.innerHTML="html,*{-moz-user-select:auto!important;}";head.appendChild(style);}void(0);})();
It's only working when web is loading. When web is load: I can selected text. But when web load completed, I can't. Can you make a script working with this domain. http://read.qidian.com/BookReader/*.aspx Best regards,
// ==UserScript==
// @name Qidian copy
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match http://read.qidian.com/BookReader/*,*.aspx
// @grant none
// ==/UserScript==
function run() {
var doc=document;var bd=doc.body;bd.onselectstart=bd.oncopy=bd.onpaste=bd.onkeydown=bd.oncontextmenu=bd.onmousemove=bd.onselectstart=bd.ondragstart=doc.onselectstart=doc.oncopy=doc.onpaste=doc.onkeydown=doc.oncontextmenu=null;doc.onselectstart=doc.oncontextmenu=doc.onmousedown=doc.onkeydown=function (){return true;};with(document.wrappedJSObject||document){onmouseup=null;onmousedown=null;oncontextmenu=null;}var arAllElements=document.getElementsByTagName('*');for(var i=arAllElements.length-1;i>=0;i--){var elmOne=arAllElements[i];with(elmOne.wrappedJSObject||elmOne){onmouseup=null;onmousedown=null;}}var head=document.getElementsByTagName('head')[0];if(head){var style=document.createElement('style');style.type='text/css';style.innerHTML="html,*{-moz-user-select:auto!important;}";head.appendChild(style);}void(0);
jQuery(document).off("selectstart").off("contextmenu");
}
run()
window.addEventListener('load', run);
hope you have a really good weekend. It's work very good. :+1:
Hi ywzhaiqi, I need a script can select and copy text in free chapter of qidian. Look like this. http://read.qidian.com/BookReader/*.aspx In all of your script what script have this function Thanks anyway.