<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sulaiman Sudirman</title>
    <description>The latest articles on DEV Community by Sulaiman Sudirman (@natsu90).</description>
    <link>https://dev.to/natsu90</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F298837%2F8e0caf92-bae5-49fc-94e5-9573fcb8adb7.jpeg</url>
      <title>DEV Community: Sulaiman Sudirman</title>
      <link>https://dev.to/natsu90</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/natsu90"/>
    <language>en</language>
    <item>
      <title>Onbeforeunload Not Working</title>
      <dc:creator>Sulaiman Sudirman</dc:creator>
      <pubDate>Tue, 29 Sep 2020 02:10:22 +0000</pubDate>
      <link>https://dev.to/natsu90/onbeforeunload-not-working-4h98</link>
      <guid>https://dev.to/natsu90/onbeforeunload-not-working-4h98</guid>
      <description>&lt;p&gt;&lt;em&gt;Repost from &lt;a href="https://sulaiman.dev/posts/onbeforeunload-not-working/"&gt;https://sulaiman.dev/posts/onbeforeunload-not-working/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onbeforeunload&lt;/code&gt; is typically implemented to ask user to take some actions before leaving the website.&lt;/p&gt;

&lt;p&gt;But somehow it does not work as intended as before, not sure since when, but it does not work in the latest Google Chrome browser.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Custom Alert Message
&lt;/h3&gt;

&lt;p&gt;The message can no longer be customised. Even though you have specified the message, it will still display to you &lt;code&gt;Changes that you made may not be saved&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Event Not Triggered
&lt;/h3&gt;

&lt;p&gt;This is the most important and confusing thing. Apparently the alert popup will not be shown at all if there is no mouse left click action happened.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Wait It is Triggered
&lt;/h3&gt;

&lt;p&gt;While it looks like the event is not triggered, but actually it is indeed triggered, only the popup alert is not shown. So you can still do whatever you want behind the scene like sending data through Ajax if you need to.&lt;/p&gt;

&lt;h4&gt;
  
  
  Demo: &lt;a href="https://jsfiddle.net/usw3mnab/2/show"&gt;https://jsfiddle.net/usw3mnab/2/show&lt;/a&gt;
&lt;/h4&gt;

</description>
      <category>javascript</category>
      <category>chrome</category>
    </item>
    <item>
      <title>TwilioHackathon - Crowdsourcing Emotional Support Helpline</title>
      <dc:creator>Sulaiman Sudirman</dc:creator>
      <pubDate>Wed, 22 Apr 2020 03:40:10 +0000</pubDate>
      <link>https://dev.to/natsu90/twiliohackathon-crowdsourcing-emotional-support-via-phone-call-13jk</link>
      <guid>https://dev.to/natsu90/twiliohackathon-crowdsourcing-emotional-support-via-phone-call-13jk</guid>
      <description>&lt;h2&gt;
  
  
  Idea
&lt;/h2&gt;

&lt;p&gt;Amid the current pandemic outbreak, peoples are forced to stay home to break the chain of transmission. But there are some unfortunate people who don't have anyone at their home to rely for help or emotional support. And also there are some who have limited or no access to the internet at their home like in New Zealand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;Think a call center system, but outsourced to and answered by anyone that registered online. Anyone who need someone to talk to will ring a hotline number, the person will be put on queue and wait. The system will ring everyone who are registered and set their status as available online. The first person who pick up will automatically connect to the caller.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Give a call to +18557725566 to chat with someone,&lt;/p&gt;

&lt;p&gt;OR become that someone who will be ready to receive a call by registering your number at &lt;a href="https://chinwag.xyz"&gt;https://chinwag.xyz&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Currently only New Zealand, Malaysia &amp;amp; USA phone number are supported for this demo.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Link to Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/natsu90/chinwag-twilio"&gt;https://github.com/natsu90/chinwag-twilio&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How we built it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;NodeJS as the backend&lt;/li&gt;
&lt;li&gt;Firebase Cloud Firestore as the database&lt;/li&gt;
&lt;li&gt;Firebase Authentication, at the beginning we're using Twilio SMS API, but we realised it cost you money, in addition of the Voice API.&lt;/li&gt;
&lt;li&gt;Twilio Voice API&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Additional Resources/Info
&lt;/h2&gt;

&lt;p&gt;If you're just started using Twilio, they have this setting called Geographic Permissions to protect from abuse. You have to toggle on the setting yourself for any country you think your user will come from. But this setting is not obviously displayed, so I had been pulling my hair for a few hours. But I'm partly to blame because I don't put a catch block in the code.😬&lt;/p&gt;

&lt;h4&gt;
  
  
  just one of our Hacking &amp;amp; Hustling sessions
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OLCj0mTi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/narpuq7azgyomwabl5dx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OLCj0mTi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/narpuq7azgyomwabl5dx.png" alt="Online Meeting"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>node</category>
      <category>voice</category>
      <category>firebase</category>
    </item>
  </channel>
</rss>
