PageSourceSearch

https://cbsorel.ru/templates/siteground71/js/easyread.js

js cbsorel.ru collected 2026-10-02 12:56:42 UTC 4,101 bytes, 161 lines download raw bytes

1$(document).ready(function(){
2
3    if (EasyReadStatus()) {
4		if (MENU_ITEMS34 != undefined) {
5			$('#extras').after('<div class="menu-easyread"></div>');
6			$('.menu-easyread').append(ParseMenu(MENU_ITEMS34));
7		}
8	    if ($.cookie("fonts") != undefined) {
9			SizeFonts($.cookie("fonts"), 0);
10		}
11		else {
12			SizeFonts(26, 1);
13		}
14        EasyReadOn();
15    }
16
17    /*Âêëþ÷åíèå ñòèëåé äëÿ ñëàáîâèäÿùèõ*/
18    $('#EasyReadOn').click(function(){
19		EasyReadOn();
20	});
21
22    /*Âêëþ÷åíèå âûêëþ÷åíèå èçîáðàæåíèé*/
23    $('#ImageOn').click(function(){
24		ImageOn();
25	});
26    $('#ImageOff').click(function() {
27		ImageOff();
28	});
29
30    /*Ðàçìåð øðèôòà*/
31    $('#microfonts').click(function(){
32		SizeFonts(24, 1);
33	});
34    $('#smallfonts').click(function(){
35		SizeFonts(26, 1);
36	});
37    $('#mediumfonts').click(function(){
38		SizeFonts(28, 1);
39	});
40    $('#bigfonts').click(function(){
41		SizeFonts(30, 1);
42	});
43
44    /*Îòêëþ÷åíèå âåðñèè äëÿ ñëàáîâèäÿùèõ*/
45    $('#EasyReadOff').click(function(){
46        $.cookie("EasyReadCookie", null);
47        $.cookie("style", null);
48        $.cookie("image", null);
49        $.cookie("fonts", null);
50        window.location.reload();
51        return false;
52    });
53
54    $('#EasyReadBtn').click(function(){
55		EasyReadStatusOn();
56        window.location.reload();
57        return false;
58    });
59
60    /*Ôóíêöèè èçìåíåíèÿ ðàçìåðà øðèôòà*/
61    function SizeFonts(size, ins) {
62		size = parseInt(size);
63		var strElem = 'font, body, #maincolumn span, #easybook a.sign, #easybook .easy_big, #easybook .easy_small';
64		var objCss = {'font-size':size+'px', 'line-height': (size+10)+'px'};
65
66		if (size && !ins) {
67	        if (EasyReadStatus()) {
68	           $(strElem).css(objCss);
69	        }
70		}
71		if (size && ins) {
72	        $(strElem).css(objCss);
73            $.cookie("fonts", size, { expires: 365, path: '/' });
74		}
75		return false;
76    }
77
78    function ImageOn() {
79        if (EasyReadStatus()) {
80            $('img').css("display","inline-block");
81            $('iframe').css("display","inline-block");
82            $('#ImageOff').css("display","inline-block");
83            $('#ImageOn').css("display","none");
84            $.cookie("image", "0", { expires: 365, path: '/' });
85            return false;
86        }
87    }
88
89    function ImageOff() {
90        if (EasyReadStatus()){
91            $('img').css("display","none");
92            $('iframe').css("display","none");
93            $('#ImageOff').css("display","none");
94            $('#ImageOn').css("display","inline-block");
95            $.cookie("image", "1", { expires: 365, path: '/' });
96            return false;
97        }
98    }
99
100	function EasyReadOn() {
101        $('#EasyReadOn').css("display","none");
102        $('#EasyReadOff').css("display","inline-block");
103        return false;
104    }
105
106	function EasyReadStatus() {
107        if ($.cookie("EasyReadCookie")=="on") {
108			return true;
109		}
110		return false;
111	}
112
113	function EasyReadStatusOn() {
114        $.cookie("EasyReadCookie", "on", {
115            expires: 365,
116            path: '/'
117        });
118	}
119
120	function ParseMenu(MENU) {
121		var links = '<ul class="ul-easy">';
122		var onclk, okpn;
123		for(iii=0, c=MENU.length; iii<c; iii++) {
124			onclk = ' onclick="$(\'.ul-id'+iii+'\').slideToggle(); return false;"';
125			links += '<li class="li-easy">';
126			if (MENU[iii][1] != undefined && MENU[iii][1] != '') {
127				links += ' <a href="'+(MENU[iii][1])+'" class="hv">';
128				okpn = 0;
129			}
130			else {
131				links += ' <a'+onclk+' href="#">';
132				okpn = 1;
133			}
134			links += MENU[iii][0];
135			if (MENU[iii][4] != undefined) {
136				if (okpn) {
137					//links += '<span>*</span>';
138				}
139				else {
140					//links += '<span'+onclk+'>*</span>';
141				}
142			}
143			links += '</a>';
144			if (MENU[iii][4] != undefined) {
145				links += '<ul class="ul-li-easy ul-id'+iii+'" style="display: none;">';
146				for(ii=4, cc=MENU[iii].length; ii<cc; ii++) {
147					links += '<li class="li-li-easy">';
148					links += '<a href="'+(MENU[iii][ii][1])+'" class="hv">';
149					links += MENU[iii][ii][0];
150					links += '</a>';
151					links += '</li>';
152				}
153				links += '</ul>';
154			}
155			links += '</li>';
156		}
157		links += '</ul>';
158        return links;
159    }
160
161});

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.