Domain Name - kompasiana.com Updates every 10s

Id Host Class Type Status Target
1 kompasiana.com IN MX 1 aspmx.l.google.com
2 kompasiana.com IN MX 1 alt1.aspmx.l.google.com
3 kompasiana.com IN MX 1 alt2.aspmx.l.google.com
4 kompasiana.com IN MX 1 aspmx2.googlemail.com
5 kompasiana.com IN MX 1 aspmx3.googlemail.com
6 kompasiana.com IN MX 1 aspmx4.googlemail.com
7 kompasiana.com IN MX 1 aspmx5.googlemail.com
8 kompasiana.com IN NS 1 ns-752.awsdns-30.net
9 kompasiana.com IN NS 1 ns-94.awsdns-11.com
10 kompasiana.com IN NS 1 ns-1416.awsdns-49.org
11 kompasiana.com IN NS 1 ns-1850.awsdns-39.co.uk
1 Viewport 2 1 width=device-width, initial-scale=1
2 Content-Type 2 1 text/html; charset=UTF-8
3 Google 2 1 notranslate
4 Description 2 1 Kompasiana merupakan Media Warga (Citizen Media) yang mengusung semangat berbagi dan saling terhubung (sharing, connecting)
5 Robots 2 1 index, follow
6 Googlebot-News 2 1 index,follow
7 Googlebot 2 1 index,follow
8 Author 2 1 Kompasiana.com
9 Language 2 1 id
10 Geo.Country 2 1 id
11 Geo.Placename 2 1 Indonesia
12 Thumbnailurl 2 1 https://assets-a1.kompasiana.com/statics/kompasiana2015/images/logo-kompasiana-beta.png?v=1516329390
13 Og:Type 2 1 website
14 Fb:Pages 2 1 194032223976103
15 Fb:App_id 2 1 397600276959629
16 Og:Site_name 2 1 KOMPASIANA
17 Robots 2 1 NOODP, NOYDIR
18 Og:Title 2 1 Kumpulan artikel Terpopuler - Kompasiana.com
19 Og:Url 2 1 https://www.kompasiana.com/popular
20 Article:Author 2 1
21 Article:Publisher 2 1
22 Msvalidate.01 2 1 94D7C64651DB01DACCF13907E3748127
23 Adx:Sections 2 1 Popular
24 Content_category 2 1 popular
25 Content_location 2 1 ID
26 Content_type 2 1 article
27 Content_publisheddate 2 1
28 Content_author 2 1 Kompasiana.com
29 Content_level 2 1
30 Content_source 2 1
31 Content_tag 2 1
32 Content_total_words 2 1
33 Keywords 2 1 kompasiana, kompas, jurnalisme warga, media warga, citizen journalism, citizen media, sharing, connecting, blogger, blog, media opini
34 Og:Image 2 1 https://assets-a1.kompasiana.com/statics/v20106_kompasiana/images/previewlink.jpg
35 K_lg 2 1 n
36 Title 2 1 Kumpulan artikel Terpopuler - Kompasiana.com
37 Viewport 5 1 width=device-width, initial-scale=1
38 Content-Type 5 1 text/html; charset=UTF-8
39 Google 5 1 notranslate
40 Description 5 1 Kompasiana merupakan Media Warga (Citizen Media) yang mengusung semangat berbagi dan saling terhubung (sharing, connecting)
41 Og:Type 5 1 website
42 Fb:Pages 5 1 194032223976103
43 Fb:App_id 5 1 397600276959629
44 Og:Site_name 5 1 KOMPASIANA
45 Robots 5 1 NOODP, NOYDIR
46 Og:Title 5 1 Halaman profil Listhia H Rahman - Kompasiana.com
47 Og:Url 5 1 https://www.kompasiana.com/listhiahr
48 Article:Author 5 1
49 Article:Publisher 5 1
50 Content_category 5 1 listhiahr
51 Content_location 5 1 ID
52 Content_type 5 1 article
53 Content_publisheddate 5 1
54 Content_author 5 1
55 Content_level 5 1
56 Keywords 5 1 kompasiana, kompas, jurnalisme warga, media warga, citizen journalism, citizen media, sharing, connecting, blogger, blog, media opini
57 Og:Image 5 1 https://assets-a1.kompasiana.com/statics/v20106_kompasiana/images/previewlink.jpg
58 K_lg 5 1 n
59 Adx:Sections 5 1 default
60 Title 5 1 Halaman profil Listhia H Rahman - Kompasiana.com

HTML header Tag

h4 Kompasiana Update
h2 KAPAL ILEGAL LEBIH BAIK DIBERIKAN PADA NELAYAN
h4 Dari Meja Redaksi
h2 KAPAL ILEGAL LEBIH BAIK DIBERIKAN PADA NELAYAN
h2 Mengenal "Skinny Fat", Si Tubuh Ideal yang Menyimpan Lemak Berlebih
h2 Inilah Tips agar Resolusi Sehatmu di Tahun Baru Bisa Sukses Besar
h2 Terpesona Motor Isyana yang Menjawab Keinginan Para Wanita
h2 Komposisi Tubuh Tak Bisa Dilihat Hanya dari Berat Badan
h2 Hal-hal yang Membuat "Udah Makan, tapi Kok Masih Laper?"
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P7HQ38');</script><script type="text/javascript"> var _siteId="10003299289"; (function(){ var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//st-a.props.id/insight.js"; var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(); </script><script type='text/javascript'> var AI_AUDIENCE_COOKIE_NAME = "ai.audience"; var aiService = aiService || {}; aiService.metaData = aiService.metaData || {}; aiService.audienceData = aiService.audienceData || {}; window.aiService.getMetaData = function(key){ try{ if(typeof window.aiService.metaData[key] != 'undefined') return window.aiService.metaData[key]; return []; }catch(ex){ return []; } }; window.aiService.getCookie = function(cookieName) { var cookiePattern = new RegExp('(^|;)[ ]*' + cookieName + '=([^;]*)'); cookieMatch = cookiePattern.exec(document.cookie); return cookieMatch ? window.decodeURIComponent(cookieMatch[2]) : 0; }; try { var audience = window.aiService.getCookie(AI_AUDIENCE_COOKIE_NAME); var audienceObjects = ""; if (audience != undefined && audience != "") { audienceObjects = JSON.parse(audience); }; if(audienceObjects != "" && typeof audienceObjects.audiences != "undefined"){ aiService.audienceData = audienceObjects.audiences; } } catch (ex) {}; window.aiService.getAudience = function(key){ try{ if(typeof window.aiService.audienceData[key] != 'undefined') return window.aiService.audienceData[key]; return []; }catch(ex){ return []; } }; /* define audience keys */ var audience_data_key = "interest"; </script><script type='text/javascript'><!--//<![CDATA[ (function(){ var m3_u = (location.protocol=='https:'?'https://ads8.kompasads.com/new/www/delivery/ajs.php':'http://ads8.kompasads.com/new/www/delivery/ajs.php'); var m3_r = Math.floor(Math.random()*99999999999); if (!document.MAX_used) document.MAX_used = ','; document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u); document.write ("?zoneid=3842"); document.write ('&amp;cb=' + m3_r); if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used); document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : '')); document.write ("&amp;loc=" + escape(window.location)); if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer)); if (document.context) document.write ("&context=" + escape(document.context)); if (document.mmm_fo) document.write ("&amp;mmm_fo=1"); document.write ("'><\/scr"+"ipt>"); })(); //]]>--> </script><script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script><script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><script type='text/javascript'> var crtg_nid = '4168'; var crtg_cookiename = 'crtg_rta'; var crtg_varname = 'crtg_content'; function crtg_getCookie(c_name){ var i,x,y,ARRCookies=document.cookie.split(";");for(i=0;i<ARRCookies.length;i++){x=ARRCookies[i].substr(0,ARRCookies[i].indexOf("="));y=ARRCookies[i].substr(ARRCookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name){return unescape(y);} }return'';} var crtg_content = crtg_getCookie(crtg_cookiename); var crtg_rnd=Math.floor(Math.random()*99999999999); (function(){ var crtg_url=location.protocol+'//rtax.criteo.com/delivery/rta/rta.js?netId='+escape(crtg_nid); crtg_url +='&cookieName='+escape(crtg_cookiename); crtg_url +='&rnd='+crtg_rnd; crtg_url +='&varName=' + escape(crtg_varname); var crtg_script=document.createElement('script');crtg_script.type='text/javascript';crtg_script.src=crtg_url;crtg_script.async=true; if(document.getElementsByTagName("head").length>0)document.getElementsByTagName("head")[0].appendChild(crtg_script); else if(document.getElementsByTagName("body").length>0)document.getElementsByTagName("body")[0].appendChild(crtg_script); })(); </script><script type='text/javascript'> var gptadslots=[]; var PWT={}; var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; PWT.jsLoaded = function(){ (function() { var gads = document.createElement('script'); var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); }; (function() { var purl = window.location.href; var url = '//ads.pubmatic.com/AdServer/js/pwt/156479/531'; var profileVersionId = ''; if(purl.indexOf('pwtv=')>0){ var regexp = /pwtv=(.*?)(&|$)/g; var matches = regexp.exec(purl); if(matches.length >= 2 && matches[1].length > 0){ profileVersionId = '/'+matches[1]; } } var wtads = document.createElement('script'); wtads.async = true; wtads.type = 'text/javascript'; wtads.src = url+profileVersionId+'/pwt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(wtads, node); })(); </script><script type="text/javascript"> googletag.cmd.push(function() { //Adslot 1 declaration gptadslots[1]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[970,90]],'div-gpt-ad-414138224105403936-1').setTargeting('Pos',['Top_1']).addService(googletag.pubads()); //Adslot 2 declaration gptadslots[2]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[300,250]],'div-gpt-ad-414138224105403936-2').setTargeting('Pos',['Right_1']).addService(googletag.pubads()); //Adslot 3 declaration gptadslots[3]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[300,250]],'div-gpt-ad-414138224105403936-3').setTargeting('Pos',['Right_2']).addService(googletag.pubads()); //Adslot 4 declaration // gptadslots[4]= googletag.defineSlot('/31800665/KOMPASIANA.COM', [[300,250]],'div-gpt-ad-414138224105403936-4').setTargeting('Pos',['Right_3']).addService(googletag.pubads()); // gptadslots[5]= googletag.defineSlot('/31800665/KOMPASIANA.COM','fluid','div-gpt-ad-414138224105403936-5').setTargeting('Pos',['Native_Ad']).addService(googletag.pubads()); //Adslot oop declaration gptadslots[0]= googletag.defineOutOfPageSlot('/31800665/KOMPASIANA.COM/home', 'div-gpt-ad-162687188723508243-oop').setTargeting('Pos',['Overlay']).addService(googletag.pubads()); // Adslot giant ads gptadslots[2222]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[300,600]],'div-gpt-ad-414138224105403936-2222').setTargeting('Pos',['Giant']).addService(googletag.pubads()); //Adslot head declaration gptadslots[6]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[100,650]],'div-gpt-ad-414138224105403936-6').setTargeting('Pos',['Skin_Left']).addService(googletag.pubads()); gptadslots[7]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[100,650]],'div-gpt-ad-414138224105403936-7').setTargeting('Pos',['Skin_Right']).addService(googletag.pubads()); //Center 1 googletag.pubads().setTargeting(audience_data_key, aiService.getAudience(audience_data_key)); var crtg_split = (crtg_content || '').split(';'); var cto_values = {}; for (var i=1;i<crtg_split.length;i++){ var key = (crtg_split[i-1].split('='))[0]; var value = (crtg_split[i-1].split('='))[1]; cto_values[key] = cto_values[key] || []; cto_values[key].push( "" + value + ""); } for (var i in cto_values) { if (cto_values.hasOwnProperty(i)) googletag.pubads().setTargeting("" + i + "", "" + cto_values[i] + ""); } googletag.pubads().enableSingleRequest(); googletag.pubads().enableAsyncRendering(); googletag.enableServices(); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-1'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-6'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-7'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-2222'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-2'); }); </script><script type="text/javascript"> function prokontra(slug,type_prokontra) { $.redirect('/prokontra/' + slug, {type : type_prokontra}); } </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-3'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-162687188723508243-oop'); }); </script><script type="text/javascript"> var base_url = "https://www.kompasiana.com/"; var ajax_loader = "https://www.kompasiana.com/assets/images/loader.svg"; var isKompasianer = ""; var notifAjax = false; var IFA = ""; var IFASC = ""; if(isKompasianer){ if(IFA != ""){ var myparam = IFA; var from = 'kompasid'; } else if(IFASC != ""){ var myparam = IFASC; var from = 'social'; } } </script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/bootstrap.min.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/slick/slick.min.js" type="text/javascript"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery.sticky-kit.min.js"></script><script defer src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/svgxuse.js?v=1516323615"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/main.js?v=1516323615"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery-redirect.js"></script><script type="text/javascript"> function loadMore(){ $('.timeline--artikel:hidden').slice(0, 10).show(); if ($('.timeline--artikel').length == $('.timeline--artikel:visible').length) { $('.load-more').hide(); } } function loadMoreMob(){ $('.timeline--artikel__mob:hidden').slice(0, 10).show(); if ($('.timeline--artikel__mob').length == $('.timeline--artikel__mob:visible').length) { $('.load-more').hide(); } } function favorit(){ alert("belum ada action") } var time = new Date().getTime(); $(document.body).bind("mousemove keypress", function(e) { time = new Date().getTime(); }); function getSliderSettings(){ return { infinite: true, slidesToShow: 2, slidesToScroll: 1 } } function getChannelDetail(id){ $.ajax({ type: "GET", url: "/ajax/channel_detail?ch_id=" + id, dataType: 'json', success: function(response) { $("#suggest_writer").html(response.view); $('.timeline--writer__slide').slick('unslick'); $('.timeline--writer__slide').slick(getSliderSettings()); } }); } if(isKompasianer){ $.ajax({ type: "GET", url: "https://apis.kompas.com/activity/pik.php?token=" + myparam + "&from=" + from, crossOrigin: true, dataType: 'json', success: function(response) { var hasil = response.results; getChannelDetail(hasil); } }); } </script><script type="text/javascript"> // function refresh() { // if(new Date().getTime() - time >= 1800000) // 15 Menit // window.location.reload(true); // else // setTimeout(refresh, 10000); // } // setTimeout(refresh, 10000); </script><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P7HQ38');</script><script type="text/javascript"> var _siteId="10003299289"; (function(){ var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//st-a.props.id/insight.js"; var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(); </script><script type='text/javascript'> var AI_AUDIENCE_COOKIE_NAME = "ai.audience"; var aiService = aiService || {}; aiService.metaData = aiService.metaData || {}; aiService.audienceData = aiService.audienceData || {}; window.aiService.getMetaData = function(key){ try{ if(typeof window.aiService.metaData[key] != 'undefined') return window.aiService.metaData[key]; return []; }catch(ex){ return []; } }; window.aiService.getCookie = function(cookieName) { var cookiePattern = new RegExp('(^|;)[ ]*' + cookieName + '=([^;]*)'); cookieMatch = cookiePattern.exec(document.cookie); return cookieMatch ? window.decodeURIComponent(cookieMatch[2]) : 0; }; try { var audience = window.aiService.getCookie(AI_AUDIENCE_COOKIE_NAME); var audienceObjects = ""; if (audience != undefined && audience != "") { audienceObjects = JSON.parse(audience); }; if(audienceObjects != "" && typeof audienceObjects.audiences != "undefined"){ aiService.audienceData = audienceObjects.audiences; } } catch (ex) {}; window.aiService.getAudience = function(key){ try{ if(typeof window.aiService.audienceData[key] != 'undefined') return window.aiService.audienceData[key]; return []; }catch(ex){ return []; } }; /* define audience keys */ var audience_data_key = "interest"; </script><script type='text/javascript'><!--//<![CDATA[ (function(){ var m3_u = (location.protocol=='https:'?'https://ads8.kompasads.com/new/www/delivery/ajs.php':'http://ads8.kompasads.com/new/www/delivery/ajs.php'); var m3_r = Math.floor(Math.random()*99999999999); if (!document.MAX_used) document.MAX_used = ','; document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u); document.write ("?zoneid=3842"); document.write ('&amp;cb=' + m3_r); if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used); document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : '')); document.write ("&amp;loc=" + escape(window.location)); if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer)); if (document.context) document.write ("&context=" + escape(document.context)); if (document.mmm_fo) document.write ("&amp;mmm_fo=1"); document.write ("'><\/scr"+"ipt>"); })(); //]]>--> </script><script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script><script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><script type='text/javascript'> var crtg_nid = '4168'; var crtg_cookiename = 'crtg_rta'; var crtg_varname = 'crtg_content'; function crtg_getCookie(c_name){ var i,x,y,ARRCookies=document.cookie.split(";");for(i=0;i<ARRCookies.length;i++){x=ARRCookies[i].substr(0,ARRCookies[i].indexOf("="));y=ARRCookies[i].substr(ARRCookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name){return unescape(y);} }return'';} var crtg_content = crtg_getCookie(crtg_cookiename); var crtg_rnd=Math.floor(Math.random()*99999999999); (function(){ var crtg_url=location.protocol+'//rtax.criteo.com/delivery/rta/rta.js?netId='+escape(crtg_nid); crtg_url +='&cookieName='+escape(crtg_cookiename); crtg_url +='&rnd='+crtg_rnd; crtg_url +='&varName=' + escape(crtg_varname); var crtg_script=document.createElement('script');crtg_script.type='text/javascript';crtg_script.src=crtg_url;crtg_script.async=true; if(document.getElementsByTagName("head").length>0)document.getElementsByTagName("head")[0].appendChild(crtg_script); else if(document.getElementsByTagName("body").length>0)document.getElementsByTagName("body")[0].appendChild(crtg_script); })(); </script><script type='text/javascript'> var gptadslots=[]; var PWT={}; var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; PWT.jsLoaded = function(){ (function() { var gads = document.createElement('script'); var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); }; (function() { var purl = window.location.href; var url = '//ads.pubmatic.com/AdServer/js/pwt/156479/531'; var profileVersionId = ''; if(purl.indexOf('pwtv=')>0){ var regexp = /pwtv=(.*?)(&|$)/g; var matches = regexp.exec(purl); if(matches.length >= 2 && matches[1].length > 0){ profileVersionId = '/'+matches[1]; } } var wtads = document.createElement('script'); wtads.async = true; wtads.type = 'text/javascript'; wtads.src = url+profileVersionId+'/pwt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(wtads, node); })(); </script><script type="text/javascript"> googletag.cmd.push(function() { //Adslot 1 declaration gptadslots[1]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[970,90]],'div-gpt-ad-414138224105403936-1').setTargeting('Pos',['Top_1']).addService(googletag.pubads()); //Adslot 2 declaration gptadslots[2]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[300,250]],'div-gpt-ad-414138224105403936-2').setTargeting('Pos',['Right_1']).addService(googletag.pubads()); //Adslot 3 declaration gptadslots[3]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[300,250]],'div-gpt-ad-414138224105403936-3').setTargeting('Pos',['Right_2']).addService(googletag.pubads()); //Adslot 4 declaration // gptadslots[4]= googletag.defineSlot('/31800665/KOMPASIANA.COM', [[300,250]],'div-gpt-ad-414138224105403936-4').setTargeting('Pos',['Right_3']).addService(googletag.pubads()); // gptadslots[5]= googletag.defineSlot('/31800665/KOMPASIANA.COM','fluid','div-gpt-ad-414138224105403936-5').setTargeting('Pos',['Native_Ad']).addService(googletag.pubads()); //Adslot oop declaration gptadslots[0]= googletag.defineOutOfPageSlot('/31800665/KOMPASIANA.COM/home', 'div-gpt-ad-162687188723508243-oop').setTargeting('Pos',['Overlay']).addService(googletag.pubads()); // Adslot giant ads gptadslots[2222]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[300,600]],'div-gpt-ad-414138224105403936-2222').setTargeting('Pos',['Giant']).addService(googletag.pubads()); //Adslot head declaration gptadslots[6]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[100,650]],'div-gpt-ad-414138224105403936-6').setTargeting('Pos',['Skin_Left']).addService(googletag.pubads()); gptadslots[7]= googletag.defineSlot('/31800665/KOMPASIANA.COM/home', [[100,650]],'div-gpt-ad-414138224105403936-7').setTargeting('Pos',['Skin_Right']).addService(googletag.pubads()); //Center 1 googletag.pubads().setTargeting(audience_data_key, aiService.getAudience(audience_data_key)); var crtg_split = (crtg_content || '').split(';'); var cto_values = {}; for (var i=1;i<crtg_split.length;i++){ var key = (crtg_split[i-1].split('='))[0]; var value = (crtg_split[i-1].split('='))[1]; cto_values[key] = cto_values[key] || []; cto_values[key].push( "" + value + ""); } for (var i in cto_values) { if (cto_values.hasOwnProperty(i)) googletag.pubads().setTargeting("" + i + "", "" + cto_values[i] + ""); } googletag.pubads().enableSingleRequest(); googletag.pubads().enableAsyncRendering(); googletag.enableServices(); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-6'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-7'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-2222'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-2'); }); </script><script type="text/javascript"> function prokontra(slug,type_prokontra) { $.redirect('/prokontra/' + slug, {type : type_prokontra}); } </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-414138224105403936-3'); }); </script><script type='text/javascript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-162687188723508243-oop'); }); </script><script type="text/javascript"> var base_url = "https://www.kompasiana.com/"; var ajax_loader = "https://www.kompasiana.com/assets/images/loader.svg"; var isKompasianer = ""; var notifAjax = false; var IFA = ""; var IFASC = ""; if(isKompasianer){ if(IFA != ""){ var myparam = IFA; var from = 'kompasid'; } else if(IFASC != ""){ var myparam = IFASC; var from = 'social'; } } </script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/bootstrap.min.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/slick/slick.min.js" type="text/javascript"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery.sticky-kit.min.js"></script><script defer src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/svgxuse.js?v=1516329390"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/main.js?v=1516329390"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery-redirect.js"></script><script type="text/javascript"> // function refresh() { // if(new Date().getTime() - time >= 1800000) // 15 Menit // window.location.reload(true); // else // setTimeout(refresh, 10000); // } // setTimeout(refresh, 10000); </script><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P7HQ38');</script><script type="text/javascript"> var _siteId="10003299289"; (function(){ var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//st-a.props.id/insight.js"; var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(); </script><script type='text/javascript'> var AI_AUDIENCE_COOKIE_NAME = "ai.audience"; var aiService = aiService || {}; aiService.metaData = aiService.metaData || {}; aiService.audienceData = aiService.audienceData || {}; window.aiService.getMetaData = function(key){ try{ if(typeof window.aiService.metaData[key] != 'undefined') return window.aiService.metaData[key]; return []; }catch(ex){ return []; } }; window.aiService.getCookie = function(cookieName) { var cookiePattern = new RegExp('(^|;)[ ]*' + cookieName + '=([^;]*)'); cookieMatch = cookiePattern.exec(document.cookie); return cookieMatch ? window.decodeURIComponent(cookieMatch[2]) : 0; }; try { var audience = window.aiService.getCookie(AI_AUDIENCE_COOKIE_NAME); var audienceObjects = ""; if (audience != undefined && audience != "") { audienceObjects = JSON.parse(audience); }; if(audienceObjects != "" && typeof audienceObjects.audiences != "undefined"){ aiService.audienceData = audienceObjects.audiences; } } catch (ex) {}; window.aiService.getAudience = function(key){ try{ if(typeof window.aiService.audienceData[key] != 'undefined') return window.aiService.audienceData[key]; return []; }catch(ex){ return []; } }; /* define audience keys */ var audience_data_key = "interest"; </script><script type="text/javascript"> var base_url = "https://www.kompasiana.com/"; var ajax_loader = "http://www.kompasiana.com/assets/images/loader.svg"; var isKompasianer = ""; var channel_id = ""; </script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/slick/slick.min.js" type="text/javascript"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery.sticky-kit.min.js"></script><script defer src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/svgxuse.js?v=3"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/main.js?v=1516206051"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/jquery-redirect.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/dropdown/classie.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/dropdown/selectFx.js"></script><script> (function() { [].slice.call( document.querySelectorAll( 'select.cs-select' ) ).forEach( function(el) { new SelectFx(el); } ); })(); </script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/bootstrap-tagsinput.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/bootstrap-datepicker.min.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/blueimp/vendor/jquery.ui.widget.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/blueimp/jquery.fileupload.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/blueimp/jquery.fileupload-process.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/blueimp/jquery.fileupload-validate.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/dropdown/classie.js"></script><script src="https://assets-a1.kompasiana.com/statics/v20106_kompasiana/js/dropdown/selectFx.js"></script><script type='text/javascript'> var is_mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)); if(is_mobile){ $(document).ready(function() { (function() { [].slice.call( document.querySelectorAll( 'select.cs-select' ) ).forEach( function(el) { new SelectFx(el); } ); })(); }); } </script><script type="text/javascript"> $('#datepicker .datepicker__ttl').datepicker({ format:'yyyy-mm-dd' }); $('#datepicker .datepicker__ttl').on('changeDate', function(ev){ $(this).datepicker('hide'); }); $("#load-more-index-channel").click(function(){ var e = $('#load-more-index-channel'); var holder = e.attr("data-holder"); var img = ajax_loader; var perPage = e.attr('data-perpage'); var page = e.attr('data-page'); var status = e.attr('data-status'); var short_url = e.attr('data-channel'); e.hide(); $("#load-image-channel").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").show(); var type = e.attr("data-type"); var url = "/ajax/channel/posts/"+type+"?per_page="+ perPage + "&page=" + page + "&short_url=" + short_url + "&status="+ status ; $.ajax({ type: "GET", url: url, dataType: 'json', success: function(response) { $("#load-image-channel").hide(); var current_page = parseInt(response.data_array.current_page) + 1; if (current_page == response.data_array.total_page){ $("#" + holder).append(response.data_array.view).fadeIn(); e.hide(); } else { e.attr('style', 'cursor:pointer !important'); e.text('Selanjutnya'); e.attr("data-perpage", response.data_array.per_page); e.attr("data-page", parseInt(response.data_array.current_page) + 1); $("#" + holder).append(response.data_array.view).fadeIn(); } } }); }) $("#load-more-favorite-channel").click(function(){ var e = $('#load-more-favorite-channel'); var holder = e.attr("data-holder"); var img = ajax_loader; var perPage = e.attr('data-perpage'); var page = e.attr('data-page'); var short_url = e.attr('data-channel'); e.hide(); $("#load-image-favorite-channel").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").show(); var type = e.attr("data-type"); var url = "/ajax/channel/posts/"+type+"?per_page="+ perPage + "&page=" + page + "&short_url=" + short_url; $.ajax({ type: "GET", url: url, dataType: 'json', success: function(response) { $("#load-image-favorite-channel").hide(); if(response.status == "end"){ e.hide(); } else{ e.attr('style', 'cursor:pointer !important'); e.text('Selanjutnya'); e.attr("data-page", parseInt(response.current_page) + 1); $("#" + holder).append(response.view).fadeIn(); } } }); }) function registerCheck(redirect_url){ $.ajax({ type:"POST", url :"/ajax/refresh-session-user", dataType:"json", success: function(response) { $('#error_register').hide(); $('#short_url_register').removeAttr('disabled'); $('#short_url').prop("readonly",false); alert("Registrasi Berhasil"); window.location = redirect_url; }, error: function(xhr, status, error) { registerCheck(redirect_url); } }); } function filterPostUser(from){ var rubrik = $('.rubrik_list option:selected').val(); var tahun = $('.tahun_list option:selected').val(); var bulan = $('.bulan_list option:selected').val(); var e = $('#filter_user'); var from = from; var perPage = e.attr('data-perpage'); var page = e.attr('data-page'); var short_url = e.attr('data-channel'); var type = $('#type_list option:selected').val(); var img = ajax_loader; if(type == ""){ type = "all"; } else{ type = type; } if(rubrik == "" || tahun == "" || bulan == ""){ alert("Rubrik,tahun,bulan harus dipilih."); return false; } else{ if(from == "top" ){ $("#users_posts").html(''); e.attr("data-page", 1); page = 1; } else{ $("#load-more-filter-posts").hide(); } $("#post_channel").hide(); $("#load-more-index-channel").hide(); $("#load-image-channel").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").show(); var url = "/ajax/channel/filter_posts?short_url="+short_url+"&per_page="+ perPage + "&page=" + page + "&tahun=" + tahun + "&bulan="+bulan+"&rubrik="+rubrik+"&type="+ type ; $.ajax({ type: "GET", url: url, dataType: 'json', success: function(response) { $("#load-image-channel").hide(); var current_page = response.data_array.current_page; if(response.data_array.total_page == 0){ $("#load-more-filter-posts").attr("data-page", 1); } else{ if (current_page == response.data_array.total_page){ $("#users_posts").append(response.data_array.view).fadeIn(); $("#load-more-filter-posts").hide(); } else{ $("#load-more-filter-posts").show(); $("#users_posts").append(response.data_array.view).fadeIn(); var newPage = parseInt(response.data_array.current_page) + 1; // $("#load-more-filter-posts").attr("data-page", parseInt(response.data_array.current_page) + 1); $("#button_load_more").html('<div class="more-stories text-center mt20"><a data-channel="'+short_url+'" data-perpage="5" data-page="'+newPage+'" data-holder="index_channel" data-status="published" id="load-more-filter-posts" onclick="filterPostUser(\'load_more\')" class="load-more" href="javascript:void(0)">Load More</a></div>'); e.attr("data-page", newPage); } } } }); } return false; }; $('#short_url_register').on('click',function(e) { e.preventDefault(); var img = ajax_loader; var short_url = $('#short_url').val(); var redirect_url = $('#short_url').attr("data-redirect"); if(!short_url){ alert("Short Url Harus Diisi"); $('#short_url').focus(); }else if(!/[^\s]/.test(short_url)){ alert("Short Url Harus Diisi"); $('#short_url').focus(); }else{ $(this).attr('disabled','disabled'); $('#short_url').prop("readonly",true); $("#error_register").html("<img src=" + img +" />"); $.ajax({ type:"POST", url :"/ajax/register", data : {short_url: short_url}, dataType:"json", success: function(result) { if(result.data_array.status == 'error'){ alert(result.data_array.message); $("#error_register").html(""); $("#short_url").removeAttr("readonly"); $("#short_url_register").removeAttr("disabled"); } else{ registerCheck(redirect_url); } }, error: function(response) { if (typeof response.responseJSON.header.description.error != 'undefined') { msg = response.responseJSON.header.description.description.short_url[0]; } else { msg = response.responseJSON.header.message; } $('#error_register').html(msg).css({ color: "red" }).hide().slideDown('slow'); $('#short_url_register').removeAttr('disabled'); $('#short_url').prop("readonly",false); } }); } }); // Change Avatar $(function () { $("body").on('click', '#avatar-click', function () { $("#avatar-upload").trigger('click'); }); var clone = $(".edit-foto-pic").clone(); var t = $("#avatar-upload"); var dataConfirm = t.attr("data-confirm"); var dataProgress = t.attr("data-progress"); var dataSuccess = t.attr("data-success"); $('#avatar-upload').fileupload({ dataType: 'json', add: function (e, data) { if (data.files && data.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('#avatar-preview').attr('src', e.target.result); } reader.readAsDataURL(data.files[0]); var confirm = $('<a href="#"><span>' + dataConfirm + '</span></a>').click(function () { $('.photo').unbind('mouseenter mouseleave'); data.context = $('.edit-foto-pic').html(dataProgress); data.submit(); }); data.context = $('.edit-foto-pic').html(confirm); } }, fail: function (e, response) { if (typeof response.jqXHR.responseJSON.header.description.error != 'undefined') { msg = response.jqXHR.responseJSON.header.description.error; alert(msg); } else { msg = response.jqXHR.responseJSON.header.message; alert(msg); } $('.edit-foto-pic').html('ERROR: ' + msg); setTimeout(function() { $('.edit-foto-pic').replaceWith(clone); }, 10000); }, done: function (e, data) { $.ajax({ url: "/ajax/refresh-session-user", dataType: 'json', success: function() { $('.edit-foto-pic').html(dataSuccess); } }); } }); }); // Change Cover var uploadCount = 0; $(function () { $("body").on('click', '#cover-click', function () { $("#cover-upload").trigger('click'); }); var clone = $(".edit-foto").clone(); var t = $("#cover-upload"); var dataConfirm = t.attr("data-confirm"); var dataProgress = t.attr("data-progress"); var dataSuccess = t.attr("data-success"); $('#cover-upload').fileupload({ dataType: 'json', add: function (e, data) { if (data.files && data.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('#cover-preview').attr('src', e.target.result); } reader.readAsDataURL(data.files[0]); var confirm = $('<a href="#"><span>' + dataConfirm + '</span></a>'); if (uploadCount > 0) { confirm = ''; } data.context = confirm.appendTo($('.edit-foto')) .click(function () { $("#cover-click").remove(); $('.cover').unbind('mouseenter mouseleave'); data.context = $('.edit-foto').html(dataProgress); data.submit(); }); uploadCount++; } }, fail: function (e, response) { if (typeof response.jqXHR.responseJSON.header.description.error != 'undefined') { msg = response.jqXHR.responseJSON.header.description.error; } else { msg = response.jqXHR.responseJSON.header.message; } $('.edit-foto').html('ERROR: ' + msg); setTimeout(function() { $('.edit-foto').replaceWith(clone); }, 10000); }, done: function (e, data) { $.ajax({ url: "/ajax/refresh-session-user", dataType: 'json', success: function() { $('.edit-foto').html(dataSuccess); } }); } }); }); // follow channel // $(document).on('click', '#follow', function(e){ // e.preventDefault(); // var $t = $(this); // var cid = $(this).attr('data-id'); // var location = $(this).attr('data-location'); // if(!isKompasianer) // { // alert("Anda harus login / mendaftar sebagai Kompasianer terlebih dahulu."); // return false; // } // if(location == null) { // var replace = '<a href="#" id="unfollow" data-id='+cid+'><span>UNFOLLOW</span></a>'; // } else { // var replace = '<a href="#" data-location="friends" id="unfollow" data-id='+cid+'><span>UNFOLLOW</span></a>'; // } // $.ajax({ // type: "POST", // url: "/ajax/follow", // data: {cid: cid}, // dataType: 'json', // success: function(response) { // $t.replaceWith(replace).fadeIn(); // loadCountFriends(); // } // }); // //btn-follow mt10 // }); // unfollow channel // $(document).on('click', '#unfollow', function(e){ // e.preventDefault(); // var $t = $(this); // var cid = $(this).attr('data-id'); // var location = $(this).attr('data-location'); // if(!isKompasianer) // { // alert("Anda harus login / mendaftar sebagai Kompasianer terlebih dahulu."); // return false; // } // if(location == null) { // var replace = '<a href="#" id="follow" data-id='+cid+'><span>FOLLOW</span></a>'; // } else { // var replace = '<a href="#" data-location="friends" id="follow" data-id='+cid+'><span>FOLLOW</span></a>'; // } // $.ajax({ // type: "POST", // url: "/ajax/unfollow", // data: {cid: cid}, // dataType: 'json', // success: function(response) { // $t.replaceWith(replace).fadeIn(); // loadCountFriends(); // } // }); // //btn-small mt10 // }); //delete post $(document).on('click', '.delete-reason', function(e){ var form = $(this).attr('data-form'); var id = $(this).attr('data-id'); if(form == 'false') { $("#delete-reason_"+id).removeClass('collapsed'); $("#form-delete_"+id).addClass('in'); $(this).attr('data-form', 'true'); } else { $("#delete-reason_"+id).addClass('collapsed'); $("#form-delete_"+id).removeClass('in'); $(this).attr('data-form', 'false'); } }); $(document).on('click', '#delete-post', function(e){ e.preventDefault(); var t = $(this); var success = t.attr('data-success'); var isGood = confirm(t.attr('data-confirm')); var id = t.attr("data-id"); var msg = ''; var holder = $("#holder-tools"); var elem = $("#item_" + id); var isAdmin = (t.attr('data-admin') == "1") ? '?admin=true' : ''; var alasan = ($('#alasanhapus').val()) ? alasan = "&reason=" + $('#alasanhapus').val() : ''; if (! isKompasianer) { alert("anda harus login terlebih dahulu"); return false; } if (! isGood) { return false; } if (elem.length > 0) { elem.find(".holder-tools").html($("<img />", { "src": ajax_loader })).show(); } else { holder.html($("<img />", { "src": ajax_loader })).show(); } $.ajax({ type: "POST", url: "/ajax/delete_post/" + id + isAdmin + alasan, dataType: 'json', error: function(response) { if (typeof response.responseJSON.header.description.error != 'undefined') { msg = response.responseJSON.header.description.error; } else { msg = response.responseJSON.header.message; } if (elem.length > 0) { elem.find(".holder-tools").html($("<span />", { "text": msg }).css({ "color": "red" })); } else { holder.html($("<span />", { "text": msg }).css({ "color": "red" })); } }, success: function (response) { $('#textarea_alasanhapus').css('display', 'none'); $('#alasanhapus').val(''); $("#item_"+id).remove(); } }); }); //enable all form disable $(document).on('click', '.dashboard-setting--edit', function(e){ e.preventDefault(); $(".form-edit[disabled]").prop("disabled", false); // $("input").removeAttr('disabled'); // $(".input-identitas").removeAttr('disabled'); // $("textarea").removeAttr('disabled'); $(".input-email").attr('disabled','disabled'); $(".radio_button").removeAttr('disabled'); var current_identity = $("#image_identity").val(); // if(current_identity != ""){ // $("#file_identitas").attr('disabled','disabled'); // } $(".input-shorturl").attr('disabled','disabled'); $(".dashboard-setting--simpan-personal").removeAttr('disabled'); $(".dashboard-setting--simpan, .dashboard-setting--batal").show(); $(".dashboard-setting--edit").hide(); }); $(document).on('click', '.dashboard-setting--batal', function(e){ location.reload(); }); $(document).on('click', '#data_pribadi', function(e){ e.preventDefault(); $("#data_pribadi").addClass("active"); $("#data_personal").removeClass("active"); $("#data_profil").val("0"); $("#data_pribadi_personal").val("1"); $("#personal input").attr('disabled','disabled'); $("#personal textarea").attr('disabled','disabled'); $("#personal select").attr('disabled','disabled'); $("#personal").show(); $("#form_profil").hide(); $(".dashboard-setting--simpan, .dashboard-setting--batal").hide(); $(".dashboard-setting--edit").show(); }); $(document).on('click', '#data_personal', function(e){ e.preventDefault(); $("#data_personal").addClass("active"); $("#data_pribadi").removeClass("active"); $("#data_profil").val("1"); $("#data_pribadi_personal").val("0"); $("#form_profilprofil input").attr('disabled','disabled'); $("#form_profilprofil textarea").attr('disabled','disabled'); $("#form_profil").show(); $("#personal").hide(); $(".dashboard-setting--simpan, .dashboard-setting--batal").hide(); $(".dashboard-setting--edit").show(); }); function checkUserName(string) { var username = string; var pattern = new RegExp(/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/); //unacceptable chars if (pattern.test(username)) { alert('Nama profil tidak boleh mengandung unsur spesial karakter') return false; } return true; //good user input } $('input[name="file_identitas"]').change(function(){ $('#save_identitas').css('display', 'block'); }) $('#save_identitas').on('click',function(){ var image_identity = document.getElementById('image_identity').value; if(image_identity != ''){ alert('Anda sudah mengupload identitas.'); } else{ var img = ajax_loader; $("#save_identitas").hide(); $("#loading_image_form_upload_identitas").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").show(); var photo = document.getElementById("file_identitas"); var e = document.getElementById("type_identitas"); var type_identitas = e.options[e.selectedIndex].value; var data = new FormData(); data.append(photo.name,photo.files[0]); data.append('type_identitas', type_identitas); data.append('nomor_identitas',document.getElementById('nomor_identitas').value); $.ajax({ type: "POST", url: "/ajax/upload_file_identitas", processData: false, contentType: false, enctype: 'multipart/form-data', data: data, success: function(response){ $("#loading_image_form_upload_identitas").hide(); var hasil = $.parseJSON(response); if(hasil.status == 'error'){ alert(hasil.message); $("#save_identitas").show(); } else{ $("#msg_upload_identitas").show(); } } }); } }); $(document).on('click', '.dashboard-setting--simpan', function(e){ var format = /[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/; var pribadi = $('#data_profil').val(); var personal = $('#data_pribadi_personal').val(); if(pribadi == "1"){ var nama_profil = $("#nama_profil").val(); var deskripsi_profil = $("#deskripsi_profil").val(); var password_lama = $("#password_lama").val(); var password_baru = $("#password_baru").val(); var fb_url = $("#facebook_url").val(); var tw_url = $("#twitter_url").val(); var gplus_url = $("#gplus_url").val(); var tanggal_lahir = $("#tanggal_lahir").val(); var img = ajax_loader; if (checkUserName(nama_profil)) { if (nama_profil.length > 30) { alert('Nama profil maksimal 30 karakter') return false; } else { $("#btn_form_pribadi").hide(); $("#loading_image_form_pribadi").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").show(); $.ajax({ type: "POST", url: "/ajax/update_channel", data: { nama_profil: nama_profil, deskripsi_profil: deskripsi_profil, password_lama: password_lama, password_baru: password_baru, fb_url: fb_url, tw_url: tw_url, gplus_url: gplus_url, tanggal_lahir: tanggal_lahir, type: 'pribadi' }, success: function(response) { $("#btn_form_pribadi").show(); $("#loading_image_form_pribadi").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").hide(); var hasil = $.parseJSON(response); if(!hasil.status){ alert(hasil.msg); } else{ $("#msg_pribadi").show(); } } }); e.preventDefault(); } } } }); $('#personal').on('submit',function(){ var pendidikan = $("#pendidikan").val(); if(pendidikan == "Pendidikan"){ alert('Pendidikan belum dipilih'); return false; } else{ var img = ajax_loader; $("#btn_form_personal").hide(); $("#loading_image_form_personal").html("<img src=" + img + " style='display: block;margin-left: auto;margin-right: auto;' />").show(); var formData = new FormData(this); $.ajax({ type: "POST", url: "/ajax/update_channel", processData: false, contentType: false, enctype: 'multipart/form-data', data: formData, success: function(response){ $("#btn_form_personal").show(); $("#loading_image_form_personal").hide(); var hasil = $.parseJSON(response); if(!hasil.status){ alert(hasil.msg); } else{ $("#msg_personal").show(); } } }); } return false; }); function loadCountFriends() { var followers = $('span#followers'); var following = $('span#following'); var url = window.location.pathname; var split_url = url.split("/"); var channel = split_url[1]; $.ajax({ type: "GET", url: "/ajax/friends?channel_id=" + channel, dataType: 'json', success: function(response) { followers.text(response.friendship.count_followers).fadeIn(); following.text(response.friendship.count_following).fadeIn(); } }); } $('#verify-request').click(function(e) { e.preventDefault(); var t = $(this); var dataSuccess = t.attr('data-success'); var state = $('#verify-state'); var holder = $('.verify-request .holder'); var loader = $('<img>', { src: ajax_loader }); holder.html(loader); $.ajax({ url: '/ajax/verify_request', dataType: 'json', data: {verify_request: 'true'}, type: 'POST', error: function (response) { if (typeof response.responseJSON.header.description.error != 'undefined') { error = response.responseJSON.header.description.error; } else { error = response.responseJSON.header.message; } holder.text(error).css({ color: "red" }); }, success: function (response) { $.ajax({ url: "/ajax/refresh-session-user", dataType: 'json', success: function() { t.hide(); holder.text(holder.attr("data-success")).css({ color: "green" }); state.text(dataSuccess); } }); } }); }); //PROGRESS PANGKAT window.onload = function move() { var elem = document.getElementById("myBar"); var elem2 = document.getElementById("myProgress").getAttribute("data-finished"); var width = 0; var id = setInterval(frame, 20); function frame() { if (width >= elem2) { clearInterval(id); } else { width++; elem.style.width = width + '%'; elem.innerHTML = width * 1 + '%'; } } } function favorit(post_id){ var img = ajax_loader; $("#"+post_id+"_load-image-favorit").html("Loading...").show(); $("#"+post_id+"_favorit").hide(); $.ajax({ type:"POST", url :"/ajax/favorite_artikel", data : {post_id: post_id}, dataType:"json", success: function(response) { $("#"+post_id+"_load-image-favorit").hide(); if(response.status == 'error'){ $("#"+post_id+"_favorit").show(); alert(response.message); } else{ $("#"+post_id+"_favorit").show(); document.getElementById(post_id+"_favorit").innerHTML = "-"; document.getElementById(post_id+"_favorit").style.backgroundColor = "red"; document.getElementById(post_id+"_load-image-favorit").setAttribute("id",post_id+"_load-image-unfavorit"); document.getElementById(post_id+"_favorit").setAttribute("onclick","un_favorit('"+response.post_id+"','"+response.favorita_id+"')"); document.getElementById(post_id+"_favorit").setAttribute("id",post_id+"_unfavorit"); alert(response.message); } } }); } function un_favorit(post_id, favorit_id){ var img = ajax_loader; $("#"+post_id+"_load-image-unfavorit").html("Loading...").show(); $("#"+post_id+"_unfavorit").hide(); $.ajax({ type:"POST", url :"/ajax/un_favorite_artikel", data : {post_id: post_id, favorit_id: favorit_id}, dataType:"json", success: function(response) { $("#"+post_id+"_load-image-unfavorit").hide(); if(response.status == 'error'){ $("#"+post_id+"_unfavorit").show(); alert(response.message); } else{ $("#"+post_id+"_unfavorit").show(); document.getElementById(post_id+"_unfavorit").innerHTML = "+"; document.getElementById(post_id+"_unfavorit").style.backgroundColor = "#71c2ea"; document.getElementById(post_id+"_load-image-unfavorit").setAttribute("id",post_id+"_load-image-favorit"); document.getElementById(post_id+"_unfavorit").setAttribute("onclick","favorit('"+post_id+"')"); document.getElementById(post_id+"_unfavorit").setAttribute("id",post_id+"_favorit"); alert(response.message); } } }); } </script>