PageSourceSearch

https://secure.mygov.in/themes/custom/mygov_radix/src/assets/js/font-size.js?v=1.x

js mygov.in collected 2026-10-01 08:46:57 UTC 2,703 bytes, 96 lines download raw bytes

1var fontSize = 100;
2jQuery(document).ready(function () {
3	//alert("ok");
4	if (_getCookie("fontSize") != null) {
5		var fontSize = _getCookie("fontSize");
6	} else {
7		var fontSize = 100;
8	}
9	jQuery("html").css("font-size", fontSize + "%");
10});
11function _getCookie(name) {
12	var arg = name + "=";
13	var alen = arg.length;
14	var clen = document.cookie.length;
15	var i = 0;
16	while (i < clen) {
17		var j = i + alen;
18		if (document.cookie.substring(i, j) == arg) {
19			return _getCookieVal(j);
20		}
21		i = document.cookie.indexOf(" ", i) + 1;
22		if (i == 0)
23			break;
24	}
25	return null;
26}
27function _deleteCookie(name, path, domain) {
28	if (_getCookie(name)) {
29		document.cookie = name + "=" +
30			((path) ? "; path=" + path : "") +
31			((domain) ? "; domain=" + domain : "") +
32			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
33	}
34}
35// function _setCookie(name, value, expires, path, domain, secure) {
36// 	var vurl = true;
37// 	// if (path != '' && path != undefined) {
38// 	// 	vurl = validUrl(path);
39// 	// }
40// 	if (jQuery.type(name) == "string" && vurl) {
41// 		document.cookie = name + "=" + escape(value) +
42// 			((expires) ? "; expires=" + expires.toGMTString() : "") +
43// 			((path) ? "; path=" + path : "") +
44// 			((domain) ? "; domain=" + domain : "") +
45// 			((secure) ? "; secure" : "");
46// 	}
47// }
48function _setCookie(name, value, expires, path, domain, secure) {
49    if (typeof name === "string") {
50
51        let expiresStr = "";
52        if (expires instanceof Date) {
53            expiresStr = "; expires=" + expires.toUTCString();
54        }
55
56        document.cookie = name + "=" + encodeURIComponent(value) +
57            expiresStr +
58            (path ? "; path=" + path : "") +
59            (domain ? "; domain=" + domain : "") +
60            (secure ? "; secure" : "");
61    }
62}
63function _getCookieVal(offset) {
64	var endstr = document.cookie.indexOf(";", offset);
65	if (endstr == -1) { endstr = document.cookie.length; }
66	return unescape(document.cookie.substring(offset, endstr));
67}
68
69// function validUrl(path) {
70//     // Allow empty (root) path
71//     if (!path) return true;
72
73//     // Basic validation: path should start with "/"
74//     if (typeof path === "string" && path.startsWith("/")) {
75//         return true;
76//     }
77
78//     return false;
79// }
80/*********Font size resize**********/
81function set_font_size(fontType) {
82	if (fontType == "increase") {
83		if (fontSize < 130) {
84			fontSize = parseInt(fontSize) + 15;
85		}
86	} else if (fontType == "decrease") {
87		if (fontSize > 70) {
88			fontSize = parseInt(fontSize) - 15;
89		}
90	} else {
91		fontSize = 100;
92	}
93	_setCookie("fontSize", fontSize);
94	jQuery("html").css("font-size", fontSize + "%");
95	//jQuery("#template_three_column").css("font-size",fontSize + "%");
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.