little help in that code disable the right click
4 posters
Page 1 of 1
little help in that code disable the right click
little help in that code disable the right click
i find that code that disable the right click like if your mouse click is broke or you dont have the right click
https://help.forumotion.com/t131790-is-there-script-to-disable-right-klick-works-with-topics-and-vistiors-only
and to work with this system with out warning disable same as the code i asked for before but with the way of the code i find and as i guess this is HTML so will have less weak points
Michael Soft
i find that code that disable the right click like if your mouse click is broke or you dont have the right click
- Code:
<script async="async" type="text/javascript">
<!--
var message="مايكل سوفت للتطوير البرمجى";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>
https://help.forumotion.com/t131790-is-there-script-to-disable-right-klick-works-with-topics-and-vistiors-only
and to work with this system with out warning disable same as the code i asked for before but with the way of the code i find and as i guess this is HTML so will have less weak points
Michael Soft
Last edited by Michael_vx on November 4th 2014, 10:31 am; edited 1 time in total (Reason for editing : Solved)
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
u want same code but without the warning msg?
- Code:
<script async="async" type="text/javascript">
<!--
function clickIE() {if (document.all) {;return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {;return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>
Re: little help in that code disable the right click
the keys Ctrl + C still working in the code you provide_Twisted_Mods_ wrote:u want same code but without the warning msg?
so i think 1 of 2 things better do add
1 disable select or disable ctrl + C or may be both to avoid the weak spots
am I right
Edit
i forget to say it should be works with visitors only like the code Ange did provide before
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
You just stop select It will be hard to copier to copy your content because he can't select.Michael_vx wrote:the keys Ctrl + C still working in the code you provide_Twisted_Mods_ wrote:u want same code but without the warning msg?
so i think 1 of 2 things better do add
1 disable select or disable ctrl + C or may be both to avoid the weak spots
am I right
Edit
i forget to say it should be works with visitors only like the code Ange did provide before
But even if you stop CTRL+C with stopping select still there some people can copy your content with different
ways so it stop temporary not permanently.
Re: little help in that code disable the right click
i understand that nothing will work with 100% as we wish
and im trying to find that site i sow before i tried all ways i know to copy content but i failed
thanks for tips again
Edit
i find that site
http://shahiya.com/ar/
you can not select with the mouse click but there a spot that you use Ctrl + A but that will get all the page
this what im looking for
disable the select by the mouse
and im trying to find that site i sow before i tried all ways i know to copy content but i failed
thanks for tips again
Edit
i find that site
http://shahiya.com/ar/
you can not select with the mouse click but there a spot that you use Ctrl + A but that will get all the page
this what im looking for
disable the select by the mouse
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
i dont know java to well but im sure ange will help
i figured a way with css but it blocks it on all pages
i figured a way with css but it blocks it on all pages
- Code:
body {-webkit-touch-callout: none; -khtml-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; text-align: justify;}
Re: little help in that code disable the right click
wow CSS code_Twisted_Mods_ wrote:i dont know java to well but im sure ange will help
i figured a way with css but it blocks it on all pages
i think its cool Idea
to say the truth i thought that was a JavaScript
thanks again
and i wish to see better tricks
Happy Halloween and Trick or treat
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
here some javascript
just goto modules>javascript management
create a new javascript
select to use in all pages
go back to javascript management and make sure you have it turned on
just goto modules>javascript management
create a new javascript
select to use in all pages
- Code:
var domNode = $('body');
if (jQuery.browser.msie) {
domNode.get(0).onselectstart = function () { return false; };
} else
{
domNode.get(0).onmousedown = function(e){e.preventDefault()}
}
go back to javascript management and make sure you have it turned on
Re: little help in that code disable the right click
is this code should be used alone or with something else_Twisted_Mods_ wrote:here some javascript
just goto modules>javascript management
create a new javascript
select to use in all pagessave
- Code:
var domNode = $('body');
if (jQuery.browser.msie) {
domNode.get(0).onselectstart = function () { return false; };
} else
{
domNode.get(0).onmousedown = function(e){e.preventDefault()}
}
go back to javascript management and make sure you have it turned on
because it didnt work
like its not here
im sure there is a way
just if warning message disabled this might do the trick and with the code that disable select will be almost 90%
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
sorry forgot a lil of the code here it is
- Code:
$(function() {
var domNode = $('body');
if (jQuery.browser.msie) {
domNode.get(0).onselectstart = function () { return false; };
} else
{
domNode.get(0).onmousedown = function(e){e.preventDefault()}
}
});
Re: little help in that code disable the right click
i didnt see that was just a little lil was missing
no problem 1st thing disable select is done now the only left is disable the right click with the short Keys same as this way works
ill start also trying my own Idea if did it work ill share the code
no problem 1st thing disable select is done now the only left is disable the right click with the short Keys same as this way works
ill start also trying my own Idea if did it work ill share the code
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
Hello Michael,
To disable the context menu(right click), go to Administration Panel > Modules > JavaScript codes management > create a new script
Title : your choice
placement : in all the pages
paste the code below and submit :
To disable the context menu(right click), go to Administration Panel > Modules > JavaScript codes management > create a new script
Title : your choice
placement : in all the pages
paste the code below and submit :
- Code:
document.oncontextmenu = function(e) { e.preventDefault() };
Re: little help in that code disable the right click
disable right click, highlighting, cut and copy options
- Code:
$(document).on({
"contextmenu": function(e) {
console.log("ctx menu button:", e.which);
// Stop the context menu
e.preventDefault();
},
"mousedown": function(e) {
console.log("normal mouse down:", e.which);
},
"mouseup": function(e) {
console.log("normal mouse up:", e.which);
}
});
$(function() {
var domNode = $('body');
if (jQuery.browser.msie) {
domNode.get(0).onselectstart = function () { return false; };
} else
{
domNode.get(0).onmousedown = function(e){e.preventDefault()}
}
});
$(document).ready(function() {
$('body').bind('copy cut',function(e) {
e.preventDefault(); //disable cut,copy,paste
alert('cut & copy options are disabled !!');
});
});
Re: little help in that code disable the right click
now that what i call it super cool
one last thing
i tried to add
Edit
sorry was my mistake
i forget to test in Visitor mode its done
one last thing
i tried to add
- Code:
if (location.pathname == '/contact') return;
if (!document.getElementById('logout'))
Edit
sorry was my mistake
i forget to test in Visitor mode its done
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: little help in that code disable the right click
there is little problem i just find out
the toolbar of the forum is disabled by the code
when Script active the forum toolbar disappear when not the toolbar appear again any tips ?
Edit
i dont know why i do rush so much these days
it was also my mistake in changing of the code
mark topic as solved
thanks a lot
the toolbar of the forum is disabled by the code
when Script active the forum toolbar disappear when not the toolbar appear again any tips ?
Edit
i dont know why i do rush so much these days
it was also my mistake in changing of the code
mark topic as solved
thanks a lot
Last edited by Michael_vx on November 4th 2014, 10:31 am; edited 1 time in total (Reason for editing : Solved)
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Similar topics
» Disable Right Click
» Disable Right Click
» Disable Left and Right click on Legend only
» Disable right click for images only
» i want to disable a css code on the code box
» Disable Right Click
» Disable Left and Right click on Legend only
» Disable right click for images only
» i want to disable a css code on the code box
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum