- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi greetings from Kenya
I am using the disable right click and disable keyboard short cuts like CTRL P with good effect.
But a friend was troubleshooting weird twitter card stuff and he said, u gave the twitter cards 3 times on 1 page.
I asked him how he saw that. He was pressing F11 or F12 to see my source code. Like u do when u right click and INSPECT
is there any code for disabling that???
Cheers whitemonkey
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Ok i got it.....
I am now using: <script type="text/javascript"> document.onkeydown = function (event) { event = (event || window.event); if (event.keyCode == 123 || event.keyCode == 18 || event.keyCode == 17 || event.keyCode == 67 || event.keyCode == 16) { alert("This function is disabled here"); return false; } } </script>
123 blocks F12, 18 blocks ALT 17 blocks CTRL 16 blocks SHIFT keys extra security 67 blocks c
This is a great source @Adam and @Bernadette : https://css-tricks.com/snippets/javascript/javascript-keycodes/
But my buddy can hit f12 many times and it works but he is a tech guy .. was quite shocking what he could do ... but these blocks stop 99% of people
Best regards stay safe, stay at home and stay sane . I am 'stuck in KENYA until July 5 (((((
🙊🙉🙈
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Disable F12 - place the following in SEO Header...
<script type="text/javascript"> document.onkeydown = function (event) { event = (event || window.event); if (event.keyCode == 123 || event.keyCode == 18) { alert("This function is disabled here"); return false; } } </script>
F11 key (in Windows) in most browser windows will switch full-screen mode and disabling that is likely to upset some viewers!! 🙂 Not sure how he can use F11 to view code?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
@NJRFTF thank you sadly it didnt work for the F12. I have the other code pasted as well. The one that disables CTRL keys in the HEADER
Right click is in the FOOTER....
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Here's my "F12 disabled" message box in Chrome on a weebly page...your scripts may be bumping heads!! 🙂
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi @NJRFTF bit of a long saga here
The code u gave me works if i delete the CTRL C code i had in there, which was working and now apparently doesnt work ((
But this f12 if you hit F12 twice u can see the source code...
This is the code i was using to block keyboard short cuts but doesnt block ctrl , now at least am not sure if it was blocking print screen or other ctrl functions:
<script type="text/javascript">
document.onkeydown = function (cc) {
if(cc.which == 85){
return false;
}
if(cc.which == 80){
return false;
}
}
</script>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Ok i got it.....
I am now using: <script type="text/javascript"> document.onkeydown = function (event) { event = (event || window.event); if (event.keyCode == 123 || event.keyCode == 18 || event.keyCode == 17 || event.keyCode == 67 || event.keyCode == 16) { alert("This function is disabled here"); return false; } } </script>
123 blocks F12, 18 blocks ALT 17 blocks CTRL 16 blocks SHIFT keys extra security 67 blocks c
This is a great source @Adam and @Bernadette : https://css-tricks.com/snippets/javascript/javascript-keycodes/
But my buddy can hit f12 many times and it works but he is a tech guy .. was quite shocking what he could do ... but these blocks stop 99% of people
Best regards stay safe, stay at home and stay sane . I am 'stuck in KENYA until July 5 (((((
🙊🙉🙈
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
This all went over my head, @whitemonkey but wanted to say HI and hope you are well.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
@Bernadette hi.
The trick with the coding.... dt try to understand it.... just accept it as what u have to do.. lol
I am well. Hope you are too.
Going a bit stir crazy.... people offering advice like Fly to, Thailand. Check the flight departures on line from Nairobi..... what part of THE AIRPORT IS CLOSED dt they get... ....?? Ok they have been some evac flights too expensive, requiring expensive covid test and taxi ride to get to Nairobi. UK now requires quarantine but have no where to go in UK... other countries are slowly opening up... soon there will be a heap of choices... so i continue to wait.. and hope they open here...
Take care there Trev ❤