- var Sys = {};
- var ua = Navigator.userAgent.toLowerCase ();
- if (window. ActiveXObject)
- {
- Document.body.oncopy=function ()
- {
- Event.returnvalue = false;
- var t=document.selection.createrange (). text;
- var s= "\ r \ n Original from [Good Handsome personal blog] reproduced please keep the original link:" +LOCATION.HREF;
- Clipboarddata.setdata (' Text ', t+ ' \ r \ n ' +s);
- }
- }
- Else
- {
- function Addlink ()
- {
- var body_element = document.getelementsbytagname (' body ') [0];
- var selection;
- Selection = Window.getselection ();
- var pagelink = "Original from [Good Handsome personal blog] reproduced please keep the original link:" +DOCUMENT.LOCATION.HREF;
- var copytext = Selection + Pagelink;
- var newdiv = document.createelement (' div ');
- newdiv.style.position= ' absolute ';
- newdiv.style.left= ' -99999px ';
- Body_element.appendchild (NEWDIV);
- newdiv.innerhtml = CopyText;
- Selection.selectallchildren (NEWDIV);
- Window.settimeout
- (
- function ()
- {
- Body_element.removechild (NEWDIV);
- },0
- );
- }
- Document.oncopy = Addlink;
- }
Copy Web content automatically add website copyright information compatible IE Google Firefox