PageSourceSearch

https://www.selka.id/assets/js/page/news.js?v20260915=

js selka.id collected 2026-09-26 11:13:19 UTC 7,174 bytes, 230 lines download raw bytes

1/* news_v.php */
2
3$(".home-promo-small-info").dotdotdot();
4
5$(".sidebar-category li").each(function () {
6    var color = $(this).attr("color");
7    $(this).css("background-color", "#" + color);
8});
9
10var color = $(".news-title-category").attr("color");
11$(".news-title-category").css("background-color", "#" + color);
12
13/* article_v.php */
14
15$(".review-content-star").raty({
16    starOff: base.base_url + "assets/images/other/raty/star-off-big.png",
17    starOn: base.base_url + "assets/images/other/raty/star-on-big.png",
18    starHalf: base.base_url + "assets/images/other/raty/star-half-big.png",
19    readonly: true,
20    halfShow: true,
21    score: function () {
22        return $(this).attr("star-rating");
23    },
24});
25
26// $('.news-article-content-wrapper a[href^="http://"]').attr("target", "_blank");
27$('.news-article-content-wrapper a[href^="http://"]').removeAttr("target");
28
29$("h2, h3").each(function () {
30    var headerText = $(this).text().toLowerCase();
31    var idValue = headerText.replace(/\s+/g, "_");
32    $(this).attr("id", idValue);
33});
34
35$(".news-article-content-wrapper img").wrap(
36    '<div class="article-img-wrapper"></div>'
37);
38
39$(".home-promo-small-info").dotdotdot();
40
41$(".sidebar-category li").each(function () {
42    var color = $(this).attr("color");
43    $(this).css("background-color", "#" + color);
44});
45
46var color = $(".article-title-category").attr("color");
47$(".article-title-category").css("background-color", "#" + color);
48
49$(".reply-button").click(function (e) {
50    e.preventDefault();
51
52    var replyID = $(this).attr("replyID");
53    var replyName = $(this).attr("replyName");
54
55    $("html, body").animate(
56        {
57            scrollTop: $("#txt_name").offset().top - 160,
58        },
59        "slow"
60    );
61
62    $("#txt_name").focus();
63    $("#hid_comment_reply").val("y");
64    $("#hid_comment_reply_id").val(replyID);
65    $("#news_article_comment_headline").html("Reply " + replyName);
66});
67
68var isCommentButtonClick = false;
69$(".comment-button").on("click", function () {
70    if (isCommentButtonClick) {
71        return; // Prevent button spamming twice before submitting
72    }
73
74    isCommentButtonClick = true;
75    console.log($("#txt_comment").val());
76
77    if (
78        $("#txt_comment").val() !== "" &&
79        $("#txt_name").val() !== "" &&
80        $("#txt_email").val() !== ""
81    ) {
82        $.ajax({
83            type: "POST",
84            url: base.base_url + "news/insert_article_comment",
85            dataType: "json",
86            data: $("#form_comment").serialize(),
87            error: function () {
88                alert("error");
89            },
90            success: function (result) {
91                $("#txt_name").val("");
92                $("#txt_email").val("");
93                $("#txt_comment").val("");
94
95                $("#hid_comment_reply").val("");
96                $("#hid_comment_reply_id").val("");
97                $("#news_article_comment_headline").html(
98                    "Diskusi & Pertanyaan"
99                );
100                alert("Komentar anda sudah berhasil terinput.");
101                isCommentButtonClick = false;
102            },
103        });
104    } else {
105        isCommentButtonClick = false;
106    }
107});
108
109$(".news-article-comment-counter").click(function () {
110    $("html, body").animate(
111        {
112            scrollTop: $(".news-article-comment-title").offset().top - 160,
113        },
114        "slow"
115    );
116});
117
118$(".wysihtml5").wysihtml5({});
119
120$(".news-comment-row-content a").attr("rel", "nofollow");
121// $(".news-article-content-wrapper a").attr("target", "_blank");
122$(".news-article-content-wrapper a").removeAttr("target");
123
124//    jQuery.fn.addDropCap = function() {
125//	var text = $.trim($(this).text());
126//	var first_letter = text.substr(0,1);
127//	$(this).html('<span class="dropcap">' + first_letter + '</span>' + text.slice(1));
128//    };
129
130//$('.news-article-content p:first').addDropCap();
131
132$(".show-more-button").click(function () {
133    var wrapper_class = $(this).attr("wrapper_class");
134    $(this).hide();
135    $("." + wrapper_class).show("fade", "", 500);
136});
137
138$(".news-comment-inner-row-separator").click(function () {
139    var news_comment_id = $(this).attr("news_comment_id");
140    $(this).hide();
141    $(
142        '.news-comment-inner-row-hidden[news_comment_id="' +
143            news_comment_id +
144            '"]'
145    ).show("fade", "", 500);
146});
147
148$.ajax({
149    url: base.base_url + "news/attach_rahasia",
150    type: "POST",
151    data: {},
152    error: function () {},
153    success: function (html) {
154        $("#ajax-load").html(html);
155        $("#ajax-load").show();
156    },
157});
158
159$.ajax({
160    url: base.base_url + "news/attach_panduan",
161    type: "POST",
162    data: {},
163    error: function () {},
164    success: function (html) {
165        $("#ajax-load-panduan").html(html);
166        $("#ajax-load-panduan").show();
167    },
168});
169
170$("#newsletter_article_text").keypress(function (e) {
171    if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
172        $("#newsletter_article_button").click();
173        return false;
174    } else {
175        return true;
176    }
177});
178$("#newsletter_article_button").click(function () {
179    $("#form_newsletter_article").validate({
180        rules: {
181            newsletter_bottom_text: {
182                required: true,
183                email: true,
184            },
185        },
186        messages: {
187            newsletter_bottom_text: {
188                required: "email tidak boleh kosong",
189                email: "format email masih salah",
190            },
191        },
192        errorLabelContainer: ".newsletter-error-text",
193    });
194    if ($("#form_newsletter_article").valid()) {
195        $.ajax({
196            type: "POST",
197            url: "<?=base_url('insert_newsletter')?>",
198            dataType: "json",
199            data: {
200                email: $("#newsletter_article_text").val(),
201                source: "home-mobile",
202            },
203            beforeSend: function () {
204                alert(
205                    "Terima kasih, kami akan menginfokan promo - promo terbaru melalui email anda."
206                );
207            },
208        });
209    }
210});
211
212var login_check = $("#hid_login_check").val();
213
214//if (login_check == '' && $(".paywall")[0]) {
215//    $('<div class="paywall-info">Klik untuk mendapatkan akses lengkap artikel ini dan akses Gratis untuk seluruh artikel Eksklusif Selka.id <br /> <div class="paywall-login-button">Klik Disini</div></div>').insertBefore('#instagram_feed');
216//    var non_paywall_height = $(".news-article-content-inside").height() * 0.25;
217//    $('.news-article-content-inside-after').show();
218//    $('.news-article-content-inside-after').css('height', non_paywall_height);
219//
220//    $('.paywall-login-button').click(function(){
221//        var pathname = window.location.pathname;
222//        pathname = pathname.replace("/selka_git/", "");
223//
224//        location.href = base.base_url + 'customer/signin?redirect=article&parameter1='+pathname;
225//    });
226//}else{
227//    $('.paywall').show();
228//}
229
230$(".paywall").show();

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.