Скрипт для виджета vkComments 1.0
$(document).ready(function(){function t(){$(".vkCom_wrapper").css("height",vkCom_settings.heightWidget+"px")," "==vkCom_settings.attachGraph&&$(".vkCom_icoGraph").css("display","none")," "==vkCom_settings.attachPhoto&&$(".vkCom_icoPhoto").css("display","none")," "==vkCom_settings.attachVideo&&$(".vkCom_icoVideo").css("display","none")," "==vkCom_settings.attachAudio&&$(".vkCom_icoAudio").css("display","none"),"1"==vkCom_settings.autoPublish&&($(".vkCom_checkbox").css("display","none"),$(".vkCom_checkboxChecked").css("display","block"),$(".vkCom_checkboxFrame").css("background-color","#507299"))}function e(){"1"==vkCom_settings.autoPublish&&"1"==vkCom_settings.pageUrl&&(vkCom_settings.pageUrl=window.location.href),"1"==vkCom_settings.autoPublish&&"2"==vkCom_settings.pageUrl&&(vkCom_settings.pageUrl=vkCom_settings.myLink),("0"==vkCom_settings.autoPublish||"0"==vkCom_settings.pageUrl)&&(vkCom_settings.pageUrl="");var t="";"graffiti"==vkCom_settings.attachGraph&&(t+="graffiti,"),"photo"==vkCom_settings.attachPhoto&&(t+="photo,"),"video"==vkCom_settings.attachVideo&&(t+="video,"),"audio"==vkCom_settings.attachAudio&&(t+="audio,"),"link"==vkCom_settings.attachLink&&(t+="link"),vkCom_settings.attach=t,VK.init({apiId:vkCom_settings.idWidget,onlyWidgets:!0}),VK.Widgets.Comments(vkCom_settings.idElement,{width:vkCom_settings.widthWidget,height:vkCom_settings.height,limit:vkCom_settings.limit,attach:vkCom_settings.attach,norealtime:vkCom_settings.realtime,autoPublish:vkCom_settings.autoPublish,pageUrl:vkCom_settings.pageUrl})}try{t(),e()}catch(a){console.error(a)}});