PageSourceSearch

https://www.water.gov.my/assets/shared/scripts/toolbar.js

js water.gov.my collected 2026-10-01 11:25:09 UTC 6,914 bytes, 278 lines download raw bytes

1var min=9;
2var max=18;
3
4// increase Font Size
5function increaseFontSize() {
6   var p = document.getElementsByTagName('p');
7   for(i=0;i<p.length;i++) {
8      if(p[i].style.fontSize) {
9         var s = parseInt(p[i].style.fontSize.replace("px",""));
10      } else {
11         var s = 12;
12      }
13      if(s!=max) {
14         s = 18;
15      }
16      p[i].style.fontSize = s+"px"
17   }
18   var p = document.getElementsByTagName('span');
19   for(i=0;i<p.length;i++) {
20      if(p[i].style.fontSize) {
21         var s = parseInt(p[i].style.fontSize.replace("px",""));
22      } else {
23         var s = 12;
24      }
25      if(s!=max) {
26         s = 18;
27      }
28      p[i].style.fontSize = s+"px"
29   }
30   var p = document.getElementsByTagName('input');
31   for(i=0;i<p.length;i++) {
32      if(p[i].style.fontSize) {
33         var s = parseInt(p[i].style.fontSize.replace("px",""));
34      } else {
35         var s = 12;
36      }
37      if(s!=max) {
38         s = 18;
39      }
40      p[i].style.fontSize = s+"px"
41   }
42   var p = document.getElementsByTagName('a');
43   for(i=0;i<p.length;i++) {
44      if(p[i].style.fontSize) {
45         var s = parseInt(p[i].style.fontSize.replace("px",""));
46      } else {
47         var s = 12;
48      }
49      if(s!=max) {
50         s = 18;
51      }
52      p[i].style.fontSize = s+"px"
53   }
54   var p = document.getElementsByTagName('font');
55   for(i=0;i<p.length;i++) {
56      if(p[i].style.fontSize) {
57         var s = parseInt(p[i].style.fontSize.replace("px",""));
58      } else {
59         var s = 12;
60      }
61      if(s!=max) {
62         s = 18;
63      }
64      p[i].style.fontSize = s+"px"
65   }
66}
67
68// decrease font size
69function decreaseFontSize() {
70   var p = document.getElementsByTagName('p');
71   for(i=0;i<p.length;i++) {
72      if(p[i].style.fontSize) {
73         var s = parseInt(p[i].style.fontSize.replace("px",""));
74      } else {
75         var s = 12;
76      }
77      if(s!=min) {
78         s = 9;
79      }
80      p[i].style.fontSize = s+"px"
81   }   
82   var p = document.getElementsByTagName('span');
83   for(i=0;i<p.length;i++) {
84      if(p[i].style.fontSize) {
85         var s = parseInt(p[i].style.fontSize.replace("px",""));
86      } else {
87         var s = 12;
88      }
89      if(s!=min) {
90         s = 9;
91      }
92      p[i].style.fontSize = s+"px"
93   }
94   var p = document.getElementsByTagName('input');
95   for(i=0;i<p.length;i++) {
96      if(p[i].style.fontSize) {
97         var s = parseInt(p[i].style.fontSize.replace("px",""));
98      } else {
99         var s = 12;
100      }
101      if(s!=min) {
102         s = 9;
103      }
104      p[i].style.fontSize = s+"px"
105   }
106   var p = document.getElementsByTagName('a');
107   for(i=0;i<p.length;i++) {
108      if(p[i].style.fontSize) {
109         var s = parseInt(p[i].style.fontSize.replace("px",""));
110      } else {
111         var s = 12;
112      }
113      if(s!=min) {
114         s = 9;
115      }
116      p[i].style.fontSize = s+"px"
117   }
118   var p = document.getElementsByTagName('font');
119   for(i=0;i<p.length;i++) {
120      if(p[i].style.fontSize) {
121         var s = parseInt(p[i].style.fontSize.replace("px",""));
122      } else {
123         var s = 12;
124      }
125      if(s!=min) {
126         s = 9;
127      }
128      p[i].style.fontSize = s+"px"
129   }
130}
131
132
133// reset font size
134function resetFontSize() {
135   var p = document.getElementsByTagName('p');
136   for(i=0;i<p.length;i++) {
137      if(p[i].style.fontSize) {
138         var s = parseInt(p[i].style.fontSize.replace("px",""));
139      } else {
140         var s = 12;
141      }
142      if(s!=max) {
143         s = 12;
144      }else{
145	 s = 12;
146      }
147      p[i].style.fontSize = ""
148   }   
149   var p = document.getElementsByTagName('span');
150   for(i=0;i<p.length;i++) {
151      if(p[i].style.fontSize) {
152         var s = parseInt(p[i].style.fontSize.replace("px",""));
153      } else {
154         var s = 12;
155      }
156      if(s!=max) {
157         s = 12;
158      }else{
159	 s = 12;
160      }
161      p[i].style.fontSize = ""
162   }
163   var p = document.getElementsByTagName('input');
164   for(i=0;i<p.length;i++) {
165      if(p[i].style.fontSize) {
166         var s = parseInt(p[i].style.fontSize.replace("px",""));
167      } else {
168         var s = 12;
169      }
170      if(s!=max) {
171         s = 12;
172      }else{
173	 s = 12;
174      }
175      p[i].style.fontSize = ""
176   }
177   var p = document.getElementsByTagName('a');
178   for(i=0;i<p.length;i++) {
179      if(p[i].style.fontSize) {
180         var s = parseInt(p[i].style.fontSize.replace("px",""));
181      } else {
182         var s = 12;
183      }
184      if(s!=max) {
185         s = 12;
186      }else{
187	 s = 12;
188      }
189      p[i].style.fontSize = ""
190   }
191   var p = document.getElementsByTagName('font');
192   for(i=0;i<p.length;i++) {
193      if(p[i].style.fontSize) {
194         var s = parseInt(p[i].style.fontSize.replace("px",""));
195      } else {
196         var s = 12;
197      }
198      if(s!=max) {
199         s = 12;
200      }else{
201	 s = 12;
202      }
203      p[i].style.fontSize = ""
204   }
205}
206
207// change color
208function changeColor(color)
209{
210   var p = document.getElementsByTagName('p');
211   for(i=0;i<p.length;i++) {
212      p[i].style.color = color
213   }   
214   var p = document.getElementsByTagName('span');
215   for(i=0;i<p.length;i++) {
216      p[i].style.color = color
217   }
218   var p = document.getElementsByTagName('input');
219   for(i=0;i<p.length;i++) {
220      p[i].style.color = color
221   }
222   var p = document.getElementsByTagName('a');
223   for(i=0;i<p.length;i++) {
224      p[i].style.color = color
225   }
226   var p = document.getElementsByTagName('font');
227   for(i=0;i<p.length;i++) {
228      p[i].style.color = color
229   }
230}
231
232
233// set default color
234function defaultColor()
235{
236   var p = document.getElementsByTagName('p');
237   for(i=0;i<p.length;i++) {
238      p[i].style.color = ""
239      p[i].style.fontSize = ""
240   }   
241   var p = document.getElementsByTagName('span');
242   for(i=0;i<p.length;i++) {
243      p[i].style.color = ""
244      p[i].style.fontSize = ""
245   }
246   var p = document.getElementsByTagName('input');
247   for(i=0;i<p.length;i++) {
248      p[i].style.color = ""
249      p[i].style.fontSize = ""
250   }
251   var p = document.getElementsByTagName('a');
252   for(i=0;i<p.length;i++) {
253      p[i].style.color = ""
254      p[i].style.fontSize = ""
255   }
256   var p = document.getElementsByTagName('font');
257   for(i=0;i<p.length;i++) {
258      p[i].style.color = ""
259      p[i].style.fontSize = ""
260   }
261}
262
263function changeBackground(img)
264{
265	url = base_url()+'assets/themes/admin/images/cms/'+img;
266	
267	$('#body_web').css('background-image','url('+url+')');
268	$('#body_web').css('background-repeat','repeat');
269	$('#body_web').css('background-position','center top');
270	$('#body_web').css('background-attachment','fixed');
271	$('#body_web').css('background-color','#fff');
272	
273}
274
275function closeBlock()
276{
277	$('.qr-code').css('display','none');
278}

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.