PageSourceSearch

https://pn-soe.go.id/js/controller.js

js pn-soe.go.id collected 2026-10-04 13:31:13 UTC 22,892 bytes, 537 lines download raw bytes

1(function(c) {
2    var d = function(H) {
3        var v = {};
4        var z = {};
5        var J = 80;
6        var C = 80;
7        var F = 0;
8        var a = 0;
9        var x = 0;
10        var E = c("body").css("font-family");
11        var K = "";
12        var I = function() {
13            c(v.fontsizeSelector).filter(function(g) {
14                var k = this.nodeName.toLowerCase();
15                var h = false;
16                var f = 0;
17                var e = 1;
18                switch (k) {
19                    case "h1":
20                        f = 100;
21                        h = true;
22                        break;
23                    case "h2":
24                        f = 80;
25                        e = 0.8;
26                        h = true;
27                        break;
28                    case "h3":
29                        f = 40;
30                        e = 0.6;
31                        h = true;
32                        break;
33                    case "h4":
34                        f = 20;
35                        e = 0.4;
36                        h = true;
37                        break
38                }
39                if (h) {
40                    if (v.fontSizeOverride) {
41                        c(this).attr("style", "font-size:" + (parseInt(C) + (v.fontSizeHeadersIncrement * e) + f) + "%")
42                    } else {
43                        var j = c(this).attr("style") || "";
44                        c(this).attr("style", j + ";font-size:" + (parseInt(C) + (v.fontSizeHeadersIncrement * e) + f) + "%")
45                    }
46                }
47            })
48        };
49        var w = function(f) {
50            a = parseInt(window.sessionStorage.getItem("scr_highcontrast_alternate")) || 0;
51            var e = function() {
52                c("html").removeClass("scr_highcontrast");
53                F = 0;
54                window.sessionStorage.setItem("scr_highcontrast", F);
55                if (!K) {
56                    K = c("html").attr("style")
57                }
58                var j = "";
59                if (c(this).data("rotate")) {
60                    j = " hue-rotate(" + parseInt(c(this).data("rotate")) + "deg)"
61                }
62                var h = "";
63                if (c(this).data("brightness")) {
64                    h = " brightness(" + parseInt(c(this).data("brightness")) + ")"
65                }
66                c("html").attr("style", K + ";-webkit-filter: invert(100%)" + j + h + ";filter: invert(100%)" + j + h)
67            };
68            if (!a) {
69                e.bind(this)();
70                a = c(this).data("alternate")
71            } else {
72                if (a && typeof(f) !== "undefined") {
73                    var g = c(this).data("alternate");
74                    if (g == a) {
75                        c("html").attr("style", K);
76                        a = 0
77                    } else {
78                        a = g;
79                        e.bind(this)()
80                    }
81                } else {
82                    if (a && typeof(f) === "undefined") {
83                        e.bind(this)()
84                    }
85                }
86            }
87            if (window.sessionStorage) {
88                window.sessionStorage.setItem("scr_highcontrast_alternate", a)
89            }
90        };
91        var B = function(k, m) {
92            k = k.toUpperCase();
93            var f = k.split("");
94            var g = "";
95            var h = "FEDCBA9876".split("");
96            var l = new Array();
97            l.A = "5";
98            l.B = "4";
99            l.C = "3";
100            l.D = "2";
101            l.E = "1";
102            l.F = "0";
103            for (i = 0; i < 6; i++) {
104                if (!isNaN(f[i])) {
105                    g += h[f[i]]
106                } else {
107                    if (l[f[i]]) {
108                        g += l[f[i]]
109                    } else {
110                        return false
111                    }
112                }
113            }
114            if (m && v.ieHighContrast) {
115                var j = parseInt(k, 16);
116                var e = parseInt(g, 16);
117                if (e < j) {
118                    return k
119                }
120            }
121            return g
122        };
123        var b = function(f) {
124            var l = /rgba? *\( *([0-9]{1,3}) *, *([0-9]{1,3}) *, *([0-9]{1,3})(, *[0-9]{1,3}[.0-9]*)? *\)/;
125            var g = l.exec(f);
126            if (!g) {
127                return "FFFFFF"
128            }
129            var e = Math.round(parseFloat(g[1]));
130            var j = Math.round(parseFloat(g[2]));
131            var h = Math.round(parseFloat(g[3]));
132            var k = (e + 65536).toString(16).substring(3).toUpperCase() + (j + 65536).toString(16).substring(3).toUpperCase() + (h + 65536).toString(16).substring(3).toUpperCase();
133            return k
134        };
135        var A = function(e) {
136            var f = " -webkit- -moz- -o- -ms- ".split(" ");
137            var g = document.createElement("div");
138            g.style.cssText = f.join("filter:invert(100%); ");
139            return !!g.style.length && ((document.documentMode === undefined || document.documentMode > 9))
140        };
141        var D = function(f) {
142            var e = c(f);
143            c.fn.skipElement = function(h) {
144                var j = this.css(h);
145                this.css(h, "inherit");
146                var g = this.css(h);
147                if (j != g && b(g) != "000000") {
148                    this.css(h, g);
149                    return true
150                } else {
151                    this.css(h, j);
152                    return false
153                }
154            };
155            c(f).each(function(h, m) {
156                if (c.inArray(m.nodeName.toLowerCase(), ["script", "embed", "object"]) == -1) {
157                    if (v.ieHighContrastAdvanced) {
158                        var o = c(m).css("background-color");
159                        var g = c(m).css("color");
160                        if (o && g) {
161                            var j = B(b(o));
162                            var k = B(b(g), true);
163                            var l = c(m).attr("style") || "";
164                            var n = l + " background-color:#" + j + " !important; color:#" + k + " !important";
165                            c(m).attr("style", n)
166                        }
167                    } else {
168                        if (!c(m).skipElement("background-color")) {
169                            var o = c(m).css("background-color");
170                            var g = c(m).css("color");
171                            if (o && g) {
172                                var j = B(b(o));
173                                var k = B(b(g), true);
174                                c(m).css("background-color", "#" + j);
175                                c(m).css("color", "#" + k)
176                            }
177                        }
178                    }
179                }
180            })
181        };
182        this.buildInterface = function() {
183            var X = c("<div/>").attr("id", "accessibility-links").addClass(v.position + " " + v.scrolling);
184            if (v.targetAppendMode == "bottom") {
185                X.appendTo(v.targetAppendto)
186            } else {
187                if (v.targetAppendMode == "top") {
188                    X.prependTo(v.targetAppendto)
189                }
190            }
191            var U = c("<div/>").attr("id", "text_plugin").attr("title", fr_screenreader).addClass("scbasebin screenreader text");
192            if (!v.showlabel) {
193                U.addClass("scr_nolabel")
194            }
195            X.append(U);
196            if (v.screenreader) {
197                var aa = c("<div/>").attr("id", "volume_plugin").addClass("scbasebin");
198                X.append(aa)
199            }
200            var Y = c("<div/>").attr("id", "speaker_plugin").addClass("scbasebin speaker");
201            X.append(Y);
202            var Z = c("<div/>").css("clear", "both");
203            X.append(Z);
204            if (v.showlabel) {
205                var j = c("<label/>").addClass("fr_label startapp").text(fr_screenreader);
206                U.append(j)
207            }
208            if (v.screenreader) {
209                var W = c("<button/>").attr({
210                    id: "fr_screenreader_play",
211                    title: "Play",
212                    accesskey: v.accesskey_play
213                }).addClass("pinnable").text("Play");
214                Y.append(W);
215                var f = c("<button/>").attr({
216                    id: "fr_screenreader_pause",
217                    title: "Pause",
218                    accesskey: v.accesskey_pause
219                }).addClass("pinnable").text("Pause");
220                Y.append(f);
221                var l = c("<button/>").attr({
222                    id: "fr_screenreader_stop",
223                    title: "Stop",
224                    accesskey: v.accesskey_stop
225                }).addClass("pinnable").text("Stop");
226                Y.append(l)
227            }
228            if (v.fontsize) {
229                var m = c("<button/>").attr({
230                    id: "fr_screenreader_font_increase",
231                    title: fr_increase,
232                    accesskey: v.accesskey_increase,
233                    "data-value": "1"
234                }).addClass("sizable").text(fr_increase);
235                Y.append(m);
236                var g = c("<button/>").attr({
237                    id: "fr_screenreader_font_decrease",
238                    title: fr_decrease,
239                    accesskey: v.accesskey_decrease,
240                    "data-value": "-1"
241                }).addClass("sizable").text(fr_decrease);
242                Y.append(g);
243                var T = c("<button/>").attr({
244                    id: "fr_screenreader_font_reset",
245                    title: fr_reset,
246                    accesskey: v.accesskey_reset,
247                    "data-value": "0"
248                }).addClass("resizable").text(fr_reset);
249                Y.append(T)
250            }
251            if (v.dyslexicFont) {
252                var u = c("<button/>").attr({
253                    id: "fr_screenreader_font_family",
254                    title: fr_dyslexic_title,
255                    accesskey: v.accesskey_dyslexic,
256                    "data-value": "0"
257                }).text(fr_dyslexic_title);
258                Y.append(u)
259            }
260            var k = 0;
261            if (!v.screenreader) {
262                k = 100
263            }
264            if (!v.dyslexicFont) {
265                k += 35
266            }
267            if (v.highcontrast) {
268                var V = c("<button/>").attr({
269                    id: "fr_screenreader_highcontrast",
270                    title: fr_highcontrast,
271                    accesskey: v.accesskey_highcontrast,
272                    "data-value": "0"
273                }).text(fr_highcontrast);
274                Y.append(V);
275                var s = v.highcontrastAlternate && A();
276                if (s) {
277                    var o = c("<button/>").attr({
278                        id: "fr_screenreader_highcontrast2",
279                        title: fr_highcontrast,
280                        accesskey: v.accesskey_highcontrast2,
281                        "data-alternate": "1",
282                        "data-rotate": v.colorHue
283                    }).text(fr_highcontrast);
284                    Y.append(o);
285                    var q = c("<button/>").attr({
286                        id: "fr_screenreader_highcontrast3",
287                        title: fr_highcontrast,
288                        accesskey: v.accesskey_highcontrast3,
289                        "data-alternate": "2",
290                        "data-rotate": v.colorHue,
291                        "data-brightness": v.colorBrightness
292                    }).text(fr_highcontrast);
293                    Y.append(q);
294                    a = parseInt(window.sessionStorage.getItem("scr_highcontrast_alternate")) || 0;
295                    if (a) {
296                        var n = c("button[data-alternate=" + a + "]");
297                        w.call(n)
298                    }
299                }
300                if (v.fontsize && s) {
301                    c("#speaker_plugin").css("width", parseInt(345 - k) + "px")
302                } else {
303                    if (v.fontsize) {
304                        c("#speaker_plugin").css("width", parseInt(285 - k) + "px")
305                    } else {
306                        if (!v.fontsize && s) {
307                            c("#speaker_plugin").css("width", parseInt(255 - k) + "px")
308                        }
309                    }
310                }
311            } else {
312                if (v.fontsize) {
313                    c("#speaker_plugin").css("width", parseInt(255 - k) + "px")
314                } else {
315                    c("#speaker_plugin").css("width", parseInt(135 - k) + "px")
316                }
317            }
318            if (v.template == "custom.css") {
319                c("#speaker_plugin button").css("background-color", v.toolbarBgcolor);
320                c("#accessibility-links").css("background", "transparent")
321            } else {
322                c("#accessibility-links").css("background-color", v.toolbarBgcolor)
323            }
324            if (screenReaderConfigOptions.useMinimizedToolbar) {
325                var p = c("#volume_plugin").width();
326                var e = c("#speaker_plugin").width();
327                var t = parseInt(p + e);
328                var h = 0;
329                var r = "+";
330                c("#text_plugin").attr("accesskey", screenReaderConfigOptions.accesskey_minimized);
331                switch (v.position) {
332                    case "bottomright":
333                    case "topright":
334                        c("#accessibility-links").css({
335                            right: "-" + (t + 2) + "px"
336                        });
337                        c("#text_plugin label").css({
338                            cursor: "pointer"
339                        });
340                        c("#text_plugin").css({
341                            cursor: "pointer"
342                        }).on("click", function(L) {
343                            c("#accessibility-links").animate({
344                                right: (r + h)
345                            }, 500, function() {
346                                h = h ? 0 : t;
347                                r = "+" ? "-" : "+"
348                            })
349                        });
350                        break
351                }
352            }
353        };
354        this.startTTSEngine = function() {
355            z = new jQuery.frTTSEngine(v);
356            return true
357        };
358        var y = function() {
359            c(document).on("click", ".sizable", function(e) {
360                var g = parseInt(c(this).data("value"));
361                C = parseInt(C) + parseInt(g * 5);
362                if (C > v.fontsizeMax) {
363                    C = v.fontsizeMax
364                } else {
365                    if (C < v.fontsizeMin) {
366                        C = v.fontsizeMin
367                    }
368                }
369                c("body").css("font-size", C + "%");
370                if (v.fontsizeSelector) {
371                    if (v.fontSizeOverride) {
372                        c(v.fontsizeSelector).attr("style", "font-size:" + (parseInt(C) + 20) + "%")
373                    } else {
374                        var f = c(v.fontsizeSelector);
375                        c.each(f, function(k, j) {
376                            var h = c(j).attr("style") || "";
377                            c(j).attr("style", h + ";font-size:" + (parseInt(C) + 20) + "%")
378                        })
379                    }
380                    I()
381                }
382                if (window.sessionStorage) {
383                    window.sessionStorage.setItem("scr_fontsize", C)
384                }
385            });
386            c(document).on("click", ".resizable", function(e) {
387                C = J;
388                c("body").css("font-size", J + "%");
389                if (v.fontsizeSelector) {
390                    if (v.fontSizeOverride) {
391                        c(v.fontsizeSelector).attr("style", "font-size:" + (parseInt(C) + 20) + "%")
392                    } else {
393                        var f = c(v.fontsizeSelector);
394                        c.each(f, function(g, j) {
395                            var h = c(j).attr("style") || "";
396                            c(j).attr("style", h + ";font-size:" + (parseInt(C) + 20) + "%")
397                        })
398                    }
399                    I()
400                }
401                if (window.sessionStorage) {
402                    window.sessionStorage.setItem("scr_fontsize", J)
403                }
404            });
405            c(document).on("click", "#fr_screenreader_highcontrast", function(e) {
406                F = !!parseInt(window.sessionStorage.getItem("scr_highcontrast")) || 0;
407                if (!F) {
408                    if (a) {
409                        c("html").attr("style", K);
410                        a = 0;
411                        if (window.sessionStorage) {
412                            window.sessionStorage.setItem("scr_highcontrast_alternate", a)
413                        }
414                    }
415                    c("html").addClass("scr_highcontrast");
416                    if ("ActiveXObject" in window) {
417                        D("body, body *:not(#accessibility-links, #accessibility-links *, div.shapes)")
418                    }
419                    F = 1
420                } else {
421                    c("html").removeClass("scr_highcontrast");
422                    if ("ActiveXObject" in window) {
423                        F = 0;
424                        window.location.reload()
425                    }
426                    F = 0
427                }
428                if (window.sessionStorage) {
429                    window.sessionStorage.setItem("scr_highcontrast", F)
430                }
431            });
432            c(document).on("click", "#fr_screenreader_font_family", function(e) {
433                x = !!parseInt(window.sessionStorage.getItem("scr_dyslexicfont")) || 0;
434                if (!x) {
435                    c("body").addClass("scr_dyslexic");
436                    if (v.fontsizeSelector) {
437                        if (v.fontSizeOverride) {
438                            c(v.fontsizeSelector).attr("style", "font-family:OpenDyslexic")
439                        } else {
440                            var f = c(v.fontsizeSelector);
441                            c.each(f, function(g, j) {
442                                var h = c(j).attr("style") || "";
443                                c(j).attr("style", h + ";font-family:OpenDyslexic")
444                            })
445                        }
446                    }
447                    x = 1
448                } else {
449                    c("body").removeClass("scr_dyslexic");
450                    if (v.fontsizeSelector) {
451                        if (v.fontSizeOverride) {
452                            c(v.fontsizeSelector).removeAttr("style")
453                        } else {
454                            var f = c(v.fontsizeSelector);
455                            c.each(f, function(g, j) {
456                                var h = c(j).attr("style") || "";
457                                c(j).attr("style", h + ";font-family:" + E)
458                            })
459                        }
460                    }
461                    x = 0
462                }
463                if (window.sessionStorage) {
464                    window.sessionStorage.setItem("scr_dyslexicfont", x)
465                }
466            });
467            c(document).on("click", "#fr_screenreader_highcontrast2, #fr_screenreader_highcontrast3", w)
468        };
469        (function G() {
470            c.extend(v, H);
471            if (jQuery.frTTSEngine === undefined) {
472                jQuery('script[src*="tts.js"]').clone().appendTo("body")
473            }
474            var e = c("body").css("background-color");
475            c("html").css("background-color", e);
476            J = C = v.fontsizeDefault;
477            if (window.sessionStorage) {
478                var f = window.sessionStorage.getItem("scr_fontsize");
479                if (f) {
480                    C = f
481                }
482                if (v.fontsize) {
483                    c("body").css("font-size", C + "%")
484                }
485                if (v.fontsizeSelector) {
486                    if (v.fontSizeOverride) {
487                        c(v.fontsizeSelector).attr("style", "font-size:" + (parseInt(C) + 20) + "%")
488                    } else {
489                        var g = c(v.fontsizeSelector);
490                        c.each(g, function(k, j) {
491                            var h = c(j).attr("style") || "";
492                            c(j).attr("style", h + ";font-size:" + (parseInt(C) + 20) + "%")
493                        })
494                    }
495                    I()
496                }
497                F = !!parseInt(window.sessionStorage.getItem("scr_highcontrast")) || 0;
498                if (F) {
499                    c("html").addClass("scr_highcontrast");
500                    if ("ActiveXObject" in window) {
501                        D("body, body *:not(#accessibility-links, #accessibility-links *, div.shapes)")
502                    }
503                }
504                x = !!parseInt(window.sessionStorage.getItem("scr_dyslexicfont")) || 0;
505                if (x) {
506                    c("body").addClass("scr_dyslexic");
507                    if (v.fontsizeSelector) {
508                        if (v.fontSizeOverride) {
509                            c(v.fontsizeSelector).attr("style", "font-family:OpenDyslexic")
510                        } else {
511                            var g = c(v.fontsizeSelector);
512                            c.each(g, function(k, j) {
513                                var h = c(j).attr("style") || "";
514                                c(j).attr("style", h + ";font-family:OpenDyslexic")
515                            })
516                        }
517                    }
518                }
519            }
520            y()
521        }).call(this)
522    };
523    c(function() {
524        function a() {
525            var b = !!("ontouchstart" in window);
526            var h = !!(navigator.msMaxTouchPoints);
527            var g = b || h;
528            return g
529        }
530        if (screenReaderConfigOptions.hideOnMobile && a()) {
531            return
532        }
533        window.ScreenReaderMainController = new d(screenReaderConfigOptions);
534        ScreenReaderMainController.buildInterface();
535        ScreenReaderMainController.startTTSEngine()
536    })
537})(jQuery);

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.