RaghavSh
Mega Patron
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 02-19-2022 05:01 AM
Have you ever visited a Banking site and wondered how right-click is disabled on such sites. This can be achieved on Servicenow Portals as well. We know portal is also a kind of web page and have all the possibilities, just follow the below steps:
1. Create a UI script with UI type as Mobile / Service Portal named "Restrict right click":
$(document).ready(function() {
$("body").on("contextmenu", function(e) {
alert("Security Warning: Right click disabled.");
return false;
});
});
2. Lookout for the "Theme" your portal is using and add your UI script created in step 1 using JS include:
3. Try to right click on your portal now:
- 766 Views