PageSourceSearch

https://admissions.ibsindia.org/ibsat/assets/JS/Restrict.js

js ibsindia.org collected 2026-10-02 05:54:29 UTC 2,934 bytes, 96 lines download raw bytes

1function disableCtrlKeyCombination(e) {
2    //list all CTRL + key combinations you want to disable
3    var forbiddenKeys = new Array('a', 'n', 'c', 'v', 'x', 's', 'j', 'w', 'p', 'u', 'i');
4    var key;
5    var isCtrl;
6    if (window.event) {
7        key = window.event.keyCode;     //IE
8        if (window.event.ctrlKey)
9            isCtrl = true;
10        else
11            isCtrl = false;
12    }
13    else {
14        key = e.which;     //firefox
15        if (e.ctrlKey)
16            isCtrl = true;
17        else
18            isCtrl = false;
19    }
20    //if ctrl is pressed check if other key is in forbidenKeys array
21    if (isCtrl) {
22        for (i = 0; i < forbiddenKeys.length; i++) {
23            //case-insensitive comparation
24            if (forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase()) {
25                //alert('Key combination CTRL + '+String.fromCharCode(key) +' has been disabled.');
26                return false;
27            }
28        }
29    }
30    return true;
31}
32function disableCtrlKeyCombination2(e) {
33    //list all CTRL + key combinations you want to disable
34    var forbiddenKeys = new Array('a', 'n', 'x', 's', 'j', 'w', 'p', 'u', 'i');
35    var key;
36    var isCtrl;
37    if (window.event) {
38        key = window.event.keyCode;     //IE
39        if (window.event.ctrlKey)
40            isCtrl = true;
41        else
42            isCtrl = false;
43    }
44    else {
45        key = e.which;     //firefox
46        if (e.ctrlKey)
47            isCtrl = true;
48        else
49            isCtrl = false;
50    }
51    //if ctrl is pressed check if other key is in forbidenKeys array
52    if (isCtrl) {
53        for (i = 0; i < forbiddenKeys.length; i++) {
54            //case-insensitive comparation
55            if (forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase()) {
56                //alert('Key combination CTRL + '+String.fromCharCode(key) +' has been disabled.');
57                return false;
58            }
59        }
60    }
61    return true;
62}
63document.onkeydown = function (event) {
64    event = (event || window.event);
65    if (event.keyCode == 123) {
66        //alert('No F-keys');
67        return false;
68    }
69}
70if (document.layers) {
71    //Capture the MouseDown event.
72    document.captureEvents(Event.MOUSEDOWN);
73
74    //Disable the OnMouseDown event handler.
75    document.onmousedown = function () {
76        return false;
77    };
78}
79else {
80    //Disable the OnMouseUp event handler.
81    document.onmouseup = function (e) {
82        if (e != null && e.type == "mouseup") {
83            //Check the Mouse Button which is clicked.
84            if (e.which == 2 || e.which == 3) {
85                //If the Button is middle or right then disable.
86                return false;
87            }
88        }
89    };
90}
91
92// Disable the Context Menu event.
93document.oncontextmenu = function () {
94    return false;
95};
96

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.