From 8a7b00f7726bc0cee677200dd4202ab4616f7d05 Mon Sep 17 00:00:00 2001 From: jmash Date: Fri, 14 Mar 2008 22:51:27 +0000 Subject: [PATCH] error on v1.0.1 git-svn-id: https://plugins.svn.wordpress.org/pagemash/trunk@34811 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pagemash.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pagemash.php b/pagemash.php index 1db561c..f93b59e 100644 --- a/pagemash.php +++ b/pagemash.php @@ -354,13 +354,14 @@ window.addEvent('domready', function(){ }); //disable drag text-selection - if (typeof target.style.MozUserSelect!="undefined") - document.body.style.MozUserSelect="none"; //for Mozilla - else if (typeof target.onselectstart!="undefined") - document.body.onselectstart=function(){return false} //for IE - else - document.body.onmousedown=function(){return false} //for safari, opera, etc - } + var target = document.body; + if (typeof target.onselectstart!="undefined") //for IE + target.onselectstart=function(){return false} + else if (typeof target.style.MozUserSelect!="undefined") //for mozilla + target.style.MozUserSelect="none" + else //for safari, opera, etc + target.onmousedown=function(){return false} + }); /* close dom ready */