Cant select text, though noScript is on

Ask for help about NoScript, no registration needed to post
Qiao

Cant select text, though noScript is on

Post by Qiao »

Hi!

http://www.sp-z.com/zt322801/htmlmodel/ ... 93480.html
I cannot select text on the right here, though NoScript is on. The reason is script in the bottom of the page.

Is it bug? I think there should be no problems selecting text with NoScript.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
Nan M
Ambassador
Posts: 102
Joined: Thu Mar 19, 2009 12:44 pm

Re: Cant select text, though noScript is on

Post by Nan M »

Default install, test profile with NS only.

Confirm unable to highlight text

Default install, test profile with NS disabled

Still unable to highlight text

It doesn't appear to be a NS problem.

Are you able to get the latest updates for Firefox and NoScript?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Cant select text, though noScript is on

Post by GµårÐïåñ »

Qiao wrote:Hi!

http://www.sp-z.com/zt322801/htmlmodel/ ... 93480.html
I cannot select text on the right here, though NoScript is on. The reason is script in the bottom of the page.

Is it bug? I think there should be no problems selecting text with NoScript.
I can confirm going to the site myself, I cannot copy text either. However, I was able to copy just fine the area near the form at the bottom.

Code: Select all

标题  	 :  	  
内容 	: 	 
联系人 	: 	 
联系电话 	: 	 
电子邮件 	: 	 
公司名称 	: 	 
联系地址 	: 	 
验证码 	: 	  点击换一张
  
注:1.可以使用快捷键Alt+S或Ctrl+Enter发送信息!
        2.如有必要,请您留下您的详细联系方式! 
But I noticed no fix by disabling NoScript, therefore it is safe to assume that it is NOT a NoScript issue and its either coded that way by the website or somehow rendering in a way that cannot be selected. Given that part of the page is selectable and part of it not, suggests it was made this way by design and therefore eliminates NoScript as the problem. Hopefully when he has time, Giorgio can confirm this?
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Cant select text, though noScript is on

Post by GµårÐïåñ »

Found the culprit. It is this code reference:

Code: Select all

<style>body{-moz-user-select: none;}</style><script src='http://styleweb.sp-z.com/JavaScript/CanCopy.js' language='javascript'></script>
Designed to block copying. There is supposed to be alerts when you try but since NoScript has disabled the code, it won't pop up to say anything.

Code: Select all

function selectstart()      
{
	event.returnValue=false;
}

function mousedown() 
{
	if (event.button==2)
	{
	  event.returnValue=false;
	}
}

function keydown()
{
	if (event.ctrlKey)
	{
		event.returnValue=false;
	}
}

document.onselectstart=selectstart;
document.onmousedown=mousedown;
document.onkeydown=keydown;

if(window.attachEvent)
{
    window.attachEvent("onload",onloadEvent);
}
else
{
    window.addEventListener("load",onloadEvent,false);
}

function onloadEvent()
{
    document.body.oncopy=function()
    {  //alert(LanguageCode);
//       switch(LanguageCode)
//       {
//            case 936:
//                alert('??????????????,????!');
//                break;
//            case 932:
//                alert('????????????????????????????????!');
//                break;
//            case 950:
//                alert('??????????????,????!');
//                break;
//            case 1252:
//                alert('To Protect Company good, this page is Forbidded to copy, Pardon!');
//                break;
//            case 20106:
//                alert('Um die Austeller zu schutzen, Copie dieser Seite ist verboten. Entschuldigen Sie, bitte.');
//                break;
//            default:
//                break;
//       }
       event.returnValue = false;
       clipboardData.clearData();
    }
}



Hope that helps.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7
Post Reply