Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**Steps to Activate**
1. Open the portals you want to disable right-click in "sp_portal" table.
2. Open the theme attached to the portal.
3. In the theme under "JS Includes" relatd list, create new JS include and select the UI script you created.
Go to your portal and try to roght click, it will prevent and show the alert message.

**Use Case**
1. Many high security organizations like banks do not want their images or links to be copied through "inspect" so right-click need to be disabled.
2. Many organizations want their source code to be hidden so they prevent right-click.


**Note**
1. This UI script is applied through portal theme , so it will be specific to portals using that theme. It will not have instance wide affect.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Prevent right-click on portal for portal pages.
This will secure the site code, prevent users from saving images etc.
Ideal for high security organisations.

UI Type : Mobile/service portal.
*/
(function() { // self invoking function
document.addEventListener('contextmenu', function(event) {
event.preventDefault(); // Prevent right-click operation.
alert("Right-Click Prevented for Security Reasons."); // alert message shown on right click.
});
})();
Loading