PageSourceSearch

https://sifa.sg/modules/mod_myshortlist/assets/script.min.js

js sifa.sg collected 2026-10-01 14:32:38 UTC 10,519 bytes, 1 lines download raw bytes

1function msl_initialize(e){jQuery(e+" button.myshortlist.pdfbutton").on("click touchstart",function(){jQuery(this).attr("disabled","disabled"),msl_downloadPDF(jQuery(this),jQuery(this).parents(".msl_module_wrapper").data())})}function msl_post(e){if(e){jQuery&&jQuery(e).find("input[type='submit']").attr("disabled","disabled");var t=e.elements.namedItem("cookie_prefix").value,s=e.elements.namedItem("fsuffix").value,a="_af"==s?e.elements.namedItem(t+"mpage").value:e.elements.namedItem("delaid").value,o="_df"==s?e.elements.namedItem("is_in_cart"):0;return myshortlist_ajax({form:e,module_id:e.elements.namedItem("module_id").value,item_id:a,cookie_prefix:t,suffix:s,base:e.elements.namedItem("base").value,custom_aid:e.elements.namedItem("custom_aid").value,update_form:e.elements.namedItem("update_form").value,language_tag:e.elements.namedItem("language").value,reopen_cart:o})}}function update_all_msl_forms(e,t,s,a){jQuery&&jQuery(".msl_module_wrapper[data-cp='"+a+"'][data-type*='list'], .msl_module_wrapper[data-cp='"+a+"'][data-type*='cart'], .msl_module_wrapper[data-aid='"+s+"']").each(function(){var s=jQuery(this).data("moduleId"),a=jQuery(this).data("aid"),o=jQuery(this).data("cp");if(s!=t){console.log("Updating module ["+s+", "+a+", "+o+"]");var i={option:"com_myshortlist",task:"ajax",tmpl:"component",module_id:s,base:e,custom_aid:a,customParams:!0,typeInt:jQuery(this).data("typeInt"),showSend:jQuery(this).data("showSend"),multipleLists:jQuery(this).data("multipleLists"),showClear:jQuery(this).data("showClear"),showPage:jQuery(this).data("showPage"),buttonWidth:jQuery(this).data("buttonWidth"),includeLargeMessage:jQuery(this).data("largeLimitMessage"),noForm:jQuery(this).data("noForm"),cp:jQuery(this).data("cp"),showAddPopup:jQuery(this).data("showAddPopup")};jQuery.ajax({url:e?e+"index.php":"index.php",data:i, dataType: "json"}).done(function(e){update_msl_form(s,e,!1)})}})}function update_msl_form(e,t,s){msl_debug(e,t);var a=t.split("__custom_my_shortlist_ajax_separator__");if(""==a[0])return!0;if(s?jQuery("#myshortlist_div_"+e).closest(".myshortlist_button_form").replaceWith(a[0]):jQuery(".msl_module_wrapper[data-module-id='"+e+"']").length>1?(jQuery(".msl_module_wrapper[data-module-id='"+e+"']").replaceWith(a[0]),msl_initialize(".msl_module_wrapper[data-module-id='"+e+"']")):(jQuery("#myshortlist_div_"+e).replaceWith(a[0]),msl_initialize("#myshortlist_div_"+e)),""!=a[1].trim()){var o="ms_"+e+"_style";if(document.getElementById(o))jQuery("#"+o).replaceWith(a[1]);else{var i=document.createElement("style");i.type="text/css",i.id=o,i.textContent=a[1],jQuery("head").append(i)}}if(""!=a[2].trim()){var l="ms_"+e+"_script";if(document.getElementById(l))jQuery("#"+l).replaceWith(a[2]);else{var r=document.createElement("script");r.type="text/javascript",r.id=l,r.textContent=a[2],jQuery("head").append(r)}}jQuery(".myshortlist_cart_button").off("click").click(msl_toggleCart)}function myshortlist_ajax(e){if(jQuery){var t=!1,s=!1;if(e.form){var a=(t=jQuery(e.form).data("isPlugin"))?jQuery(e.form).find(".msl_module_wrapper"):jQuery(e.form).closest(".msl_module_wrapper");s=a.data("showAddPopup");var o={option:"com_myshortlist",task:"ajax",tmpl:"component",module_id:e.module_id,custom_aid:e.custom_aid,language_tag:e.language_tag,customParams:!0,typeInt:a.data("typeInt"),showSend:a.data("showSend"),multipleLists:a.data("multipleLists"),showClear:a.data("showClear"),showPage:a.data("showPage"),buttonWidth:a.data("buttonWidth"),includeLargeMessage:a.data("largeLimitMessage"),cp:a.data("cp"),showAddPopup:a.data("showAddPopup")};t&&(o.myshortlist_add_custom_block=e.form.elements.namedItem("myshortlist_add_custom_block").value,o.msl_cb_title=e.form.elements.namedItem("msl_cb_title").value,o.msl_cb_description=e.form.elements.namedItem("msl_cb_description").value,o.msl_cb_link=e.form.elements.namedItem("msl_cb_link").value,o.msl_cb_image=e.form.elements.namedItem("msl_cb_image").value,o.msl_cb_option=e.form.elements.namedItem("msl_cb_option").value)}else o={option:"com_myshortlist",task:"ajax",tmpl:"component",module_id:e.module_id,custom_aid:e.custom_aid,language_tag:e.language_tag};return"_af"==e.suffix?(o[e.cookie_prefix+"addme"]="true",o[e.cookie_prefix+"mpage"]=e.item_id):(o[e.cookie_prefix+"deletefav"]="true",o.delaid=e.item_id),e.base&&(o.base=e.base),console.log(o),jQuery.ajax({method:"POST",url:e.base?e.base+"index.php":"index.php",data:o, dataType: "json"}).done(function(a){var o=(new Date).toLocaleTimeString();msl_debug(e.module_id,"Response Received at "+o+": "+a+"<br/>Update Form: "+e.update_form),e.update_form&&(console.log(e.module_id),update_msl_form(e.module_id,a,t),update_all_msl_forms(e.base,e.module_id,e.item_id,e.cookie_prefix),"_af"==e.suffix&&s&&msl_showPopup("myshortlist_add_popup_"+e.module_id),"_df"==e.suffix&&e.reopen_cart&&msl_openCart_noEffects(e.module_id))}).fail(function(){var t=(new Date).toLocaleTimeString();return msl_debug(e.module_id,"Request Failed at "+t),e.form&&jQuery(e.form).find("input[type='submit']").removeAttr("disabled"),!0}),!1}return!0}function myshortlist_checkbox_ajax(e,t,s,a,o,i,l,r,m,d,u){var _=a?"_af":"_df";myshortlist_ajax({module_id:e,item_id:t,cookie_prefix:s,suffix:_,base:d,custom_aid:o,update_form:!1,language_tag:u})?("_af"==_?document.getElementById(i).removeAttribute("checked"):document.getElementById(i).checked=!0,jQuery("#myshortlist_lc_message_"+e+"_span").html(m),jQuery("#myshortlist_lc_message_"+e).slideDown(),setTimeout("myshortlist_autohideMessage("+e+");",3e3)):("_af"==_?jQuery("#myshortlist_lc_message_"+e+"_span").html(l):jQuery("#myshortlist_lc_message_"+e+"_span").html(r),jQuery("#myshortlist_lc_"+e).hide(),jQuery("#myshortlist_lc_message_"+e).slideDown(),setTimeout("myshortlist_autohideMessage("+e+");",3e3))}function myshortlist_autohideMessage(e){jQuery&&jQuery("#myshortlist_lc_message_"+e).slideUp()}function myshortlist_hideMessage(e){jQuery&&jQuery("#myshortlist_lc_message_"+e).hide()}function myshortlist_toggle_list_checkboxes_interface(e){jQuery&&(jQuery("#myshortlist_lc_message_"+e).hide(),jQuery("#myshortlist_lc_"+e).show())}function msl_toggleDebugInterface(e){jQuery&&jQuery("#myshortlist_debug_inner"+e).slideToggle()}function msl_debug(e,t){var s=document.getElementById("myshortlist_ajax_response_"+e);s&&(s.innerHTML=s.innerHTML+t,console.log(t))}function msl_toggleCart(){msl_hideActivePopup(),jQuery(this).parent().siblings(".myshortlist_list_as_cart").slideToggle()}function msl_openCart(e){msl_hideActivePopup(),jQuery("#myshortlist_div_"+e+" .myshortlist_list_as_cart").slideToggle()}function msl_openCart_noEffects(e){msl_hideActivePopup(),jQuery("#myshortlist_div_"+e+" .myshortlist_list_as_cart").show()}function msl_closeCart(e){jQuery("#myshortlist_div_"+e+" .myshortlist_list_as_cart").slideUp()}function msl_openbox(e){msl_hideActivePopup(),jQuery("#myshortlist_box_"+e).show(),jQuery("#myshortlist_shadowing_"+e).show().click(msl_closebox)}function msl_closebox(e){jQuery("#myshortlist_box_"+e).hide(),jQuery("#myshortlist_shadowing_"+e).hide()}function msl_checkRequiredFields(e){var t=jQuery("#msl_send_form_"+e),s="",a="";if(t.find(".form-control[data-required='true']").each(function(){if(""==jQuery(this).val().trim()){var e=jQuery(this).siblings("label[for='"+jQuery(this).attr("id")+"']").text();a+=s+Joomla.JText._("MSL_FIELD_IS_REQUIRED").replace("%s",e),s="\n"}}),t.find(".form-checkbox[data-required='true']").each(function(){if(!jQuery(this).is(":checked")){var e=jQuery(this).siblings("label[for='"+jQuery(this).attr("id")+"']").text();a+=s+Joomla.JText._("MSL_FIELD_IS_REQUIRED").replace("%s",e),s="\n"}}),jQuery("#hasCaptcha_"+e).length>0&&grecaptcha&&0==grecaptcha.getResponse().length){var o=jQuery("#msl_captcha_"+e).text();a+=s+Joomla.JText._("MSL_FIELD_IS_REQUIRED").replace("%s",o),s="\
1n"}return""==a||(alert(a),!1)}function msl_showPopup(e){msl_hideActivePopup();var t="_"+Math.random().toString(36).substr(2,9);jQuery("body").append("<div class='myshortlist_shadowing auto_added' id='msl_shadowing"+t+"'></div>"),jQuery("#msl_shadowing"+t).show().click({target:e,randomID:t},msl_hidePopup),jQuery("#"+e).addClass("msl-popup-active").show("fast")}function msl_hidePopupID(e){jQuery(".myshortlist_shadowing.auto_added").hide().remove(),jQuery("#"+e).hide("fast",function(){jQuery(this).removeClass("msl-popup-active")})}function msl_hideActivePopup(){jQuery(".myshortlist_shadowing.auto_added").hide().remove(),jQuery(".msl-popup-active").hide("fast",function(){jQuery(this).removeClass("msl-popup-active")})}function msl_hidePopup(e){var t=e.data.target;jQuery("#msl_shadowing"+e.data.randomID).hide().remove(),jQuery("#"+t).hide("fast",function(){jQuery(this).removeClass("msl-popup-active")})}function msl_open_large_message(e){document.getElementById("myshortlist_message_box"+e).setAttribute("style","display:block;"),document.getElementById("myshortlist_message_shadowing"+e).setAttribute("style","display:block;")}function msl_close_large_message(e){document.getElementById("myshortlist_message_box"+e).removeAttribute("style"),document.getElementById("myshortlist_message_shadowing"+e).removeAttribute("style")}function msl_showPage(e,t,s){if(jQuery)jQuery("."+e+"_myshortlist_page").removeClass("active"),jQuery("#"+e+"_page"+s).addClass("active"),jQuery("#myshortlist_div_"+e+" .myshortlist_item_page").hide(),jQuery("#"+e+"fav"+s).show();else{for(i=0;i<t;i++)document.getElementById(e+"fav"+i).setAttribute("style","display: none;");document.getElementById(e+"fav"+s).removeAttribute("style")}}function msl_downloadPDF(e,t){var s={option:"com_myshortlist",task:"pdf",tmpl:"component",module_id:t.moduleId,cp:t.cp};jQuery.ajax({url:t.base?t.base+"index.php":"index.php",data:s, dataType: "json"}).done(function(s){jQuery(e).removeAttr("disabled");try{var a=JSON.parse(s);"ok"==a.result?window.location.href=t.base+"index.php?option=com_myshortlist&task=do_download_pdf&tmpl=component":(alert("Something went wrong with creating the PDF file. Please try again later."),a.error?console.log(a.error):console.log(s))}catch(e){alert("Something went wrong with creating the PDF file. Please try again later."),console.log(s),console.log(e)}}).fail(function(){jQuery(e).removeAttr("disabled")})}jQuery&&jQuery(document).mouseup(function(e){var t=jQuery(".myshortlist_list_checkboxes");t.is(e.target)||0!==t.has(e.target).length||t.hide()}),jQuery&&jQuery(document).ready(function(){jQuery(".myshortlist_cart_button").click(msl_toggleCart)}),jQuery&&jQuery(document).ready(function(){msl_initialize("")});

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.