Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to disable right click of mouse on myspace

  1. #1
    Join Date
    Aug 2006
    Location
    El Paso, TX, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to disable right click of mouse on myspace

    Been trying to get a code to work on myspace that disables users from using their right click fucntion to save my stuff. I know it can be done I have found some users who have this function; however myspace blocks the typical code most websites have to disable right clicking.
    Any help as to what can be done to make this work

    Here is a page no right clicking can be done on

    http://www.myspace.com/starofthezanarkandabes

    Thanks
    Last edited by sub91320; 08-14-2006 at 02:53 PM.

  2. #2
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Did you see this code in the source??

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    var speed = 5
    
    // decrease value to increase speed (must be positive)
    // set pause between completion of message and beginning of following message
    var pause = 10000
    
    // increase value to increase pause
    // set initial values
    var timerID = null
    var bannerRunning = false
    
    // create array
    var ar = new Array()
    
    // assign the strings to the array's elements
    ar[0] = "Hello There..."
    ar[1] = "Welcome To My Page..."
    
    // assign index of current message
    var message = 0
    
    // empty string initialization
    var state = ""
    
    // no value is currently being displayed
    clearState()
    
    // stop the banner if it is currently running
    function stopBanner() {	
    	// if banner is currently running	
    	if (bannerRunning)		
    	// stop the banner		
    	clearTimeout(timerID)	
    	// timer is now stopped	
    	timerRunning = false
    }
    
    // start the banner
    function startBanner() {	
    	// make sure the banner is stopped	
    	stopBanner()	
    	// start the banner from the current position	
    	showBanner()
    }
    
    // assign state a string of "0" characters of the length of the current message
    function clearState() {	
    	// initialize to empty string	
    	state = ""	
    	// create string of same length containing 0 digits	
    	for (var i = 0; i < ar[message].length; ++i) {		
    		state += "0"	
    	}
    }
    
    // display the current message
    function showBanner() {	
    	// if the current message is done	
    	if (getString()) {		
    		// increment message		
    		message++		
    		// if new message is out of range wrap around to first message		
    	if (ar.length <= message)			
    		message = 0		
    		// new message is first displayed as empty string		
    		clearState()		
    		// display next character after pause milliseconds		
    		timerID = setTimeout("showBanner()", pause)	
    	} 
    	else {		
    		// initialize to empty string		
    		var str = ""		
    		// built string to be displayed (only character selected thus far are displayed)		
    	for (var j = 0; j < state.length; ++j) {			
    		str += (state.charAt(j) == "1") ? ar[message].charAt(j) : "     "		
    	}		
    	// partial string is placed in status bar		
    	window.status = str		
    	// add another character after speed milliseconds		
    	timerID = setTimeout("showBanner()", speed)	
    	}
    }
    
    function getString() {	
    	// set variable to true (it will stay true unless proven otherwise)	
    	var full = true	
    	// set variable to false if a free space is found in string (a not-displayed char)	
    	for (var j = 0; j < state.length; ++j) {		
    		// if character at index j of current message has not been placed in displayed string		
    		if (state.charAt(j) == 0)			
    		full = false	
    	}	
    	// return true immediately if no space found (avoid infinitive loop later)	
    	if (full) return true	
    	// search for random until free space found (braoken up via break statement)	
    	while (1) {		
    		// a random number (between 0 and state.length - 1 == message.length - 1)		
    		var num = getRandom(ar[message].length)		
    		// if free space found break infinitive loop		
    	if (state.charAt(num) == "0")			
    		break	
    	}	
    	// replace the 0 character with 1 character at place found	
    	state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)	
    	// return false because the string was not full (free space was found)	
    	return false
    }
    
    function getRandom(max) {	
    	// create instance of current date	
    	var now = new Date()		
    	// create a random number (good generator)	
    	var num = now.getTime() * now.getSeconds() * Math.random()	
    	// cut random number to value between 0 and max - 1, inclusive	
    	return num % max
    }
    startBanner()
    // -->
    </SCRIPT></td>
    
    <script language=JavaScript>
    <!--
    
    //Disable right mouse click Script
    //By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
    //For full source code, visit http://www.dynamicdrive.com
    
    var message="Hey what gives?!";
    
    ///////////////////////////////////
    function clickIE4(){
    if (event.button==2){
    alert(message);
    return false;
    }
    }
    
    function clickNS4(e){
    if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
    alert(message);
    return false;
    }
    }
    }
    
    if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
    }
    else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
    }
    
    document.oncontextmenu=new Function("alert(message);return false")
    
    // --> 
    </script>
    That's how s/he did it. Hey it even uses that script from DD.
    Last edited by shachi; 08-13-2006 at 08:02 PM.

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    What if JavaScript was disabled? What if you were using a Pocket PC or an other handheld device, which only has cHTML? There is no reliable way to disable right-click.
    - Mike

  4. #4
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    mburt: after thinking a little bit on what the OP posted I think he means how to place javascripts in myspace. They don't allow javascript do they??

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I'm not really sure.. Ya know, I think that was the original question.. But even if you do find a way to use JavaScript as a I said before, it can be easily avoided.
    - Mike

  6. #6
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes I agree. If one is an experienced web designer then he never needs any other tools than a good text editor HTML and CSS to make nice websites(even dynamic menus can be made with CSS and HTML).

  7. #7
    Join Date
    Aug 2006
    Location
    El Paso, TX, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That code doesnt work either....I'm not after stopping the really smart guys rom getting the stuff I just want to stop the average joe from stealing images and using them elsewhere....from my myspace...
    I know myspace isnt a big deal security wise but I would like to keep the average people from saving my pics

    Yes myspace diables javascript...whenever you try to place the code it deletes the first bit of it and replaces it with .... on the begining and end of codes. I'm not genius enough to beat this just yet but I'm sure there is a way cause that persons page has it done. So there must be a way to make it work!!!

    Thanks
    Any more suggestions as to what to try???
    Last edited by sub91320; 08-14-2006 at 02:57 PM.

  8. #8
    Join Date
    Oct 2009
    Location
    Fife, Washington
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation I'm Here To Save The Day!

    I only made an account to share this wit u guys, I'm amazin' huh? Teehee juss playin'... Buh anyway, I found this page cuz someone kept stealin' my boyfriends pictures and it was so annoyin'. I put a new pic up he made for me and ONE of his "fakes" already stole it. So I was like, UGH HOW DO I MAKE IT SO THEY CAN'T SAVE IT!? How do I disable right-click? Bleh, as we all kno, u can't... Buh yea, I found http://chr15.net/myspace/RightClick.php and it worked! I hope this helps cuz it did for me, u can visit my MySpace and see for urself (^_^) I tried to do the clear.gif thing and yea, it didn't work. So have a gr8 day u guys! Let me kno if this helped any! -waves-

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If they can see it, they can get it. Right click is not required to copy images. A simple PrtSC, among other methods is all that is required.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Oct 2009
    Location
    Fife, Washington
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    If they can see it, they can get it. Right click is not required to copy images. A simple PrtSC, among other methods is all that is required.


    Well yea obviously. I knew I shoulda said that in my last message. If someone is THAT desperate to get ur picture then they will. Yea, all they hafta do is Print Screen it. The perfect way to protect ur image and make sure no one else can take it, is to NOT post it at all. Buh yea, if u don't want someone to be able to right click and steal ur picture then the link I gave works perfect. (-_-)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •