Skip to content

Instantly share code, notes, and snippets.

@venkateshwarv
venkateshwarv / babel.json
Created August 5, 2018 17:54
Bebel config
{
"presets": [
["env", {
"targets": {
"browsers": ["cover 99.5%", "ie 8-11"]
}
}]
],
"plugins": ["transform-es2017-object-entries", "transform-array-find"]
}
@venkateshwarv
venkateshwarv / inweb-getting-started.html
Created May 16, 2020 08:08
nanosurvey getting started
<script type="module" src='https://unpkg.com/inweb-survey/dist/inweb/inweb.esm.js'></script>`
<script nomodule src='https://unpkg.com/inweb-survey/dist/inweb/inweb.js'></script>
@venkateshwarv
venkateshwarv / inweb-getting-started1.html
Created May 16, 2020 09:50
Inweb Survey as a node-module
<script type="module" src='node_modules/inweb-survey/dist/inweb/inweb.esm.js'></script>
<script nomodule src="node_modules/inweb-survey/dist/inweb/inweb.js"></script>
<cc-inweb id="widget-usability" question="How are you today?" token="PC-56874" question-id='5c272306c3d98742b0f7d577'>
</cc-inweb>
@venkateshwarv
venkateshwarv / inweb-survey-events.html
Created May 16, 2020 10:49
Gist for listening to custom events.
<script>
document.addEventListener('cc-inweb-response', function ($event) {
if($event.target.attributes.id === 'widget-usability'){
<!-- react to response submission -->
}
})
</script>
<script>
_inweb.cookieId="my-cookie-name";
</script>
@venkateshwarv
venkateshwarv / inweb-throttling2.html
Created May 16, 2020 11:40
Setting throttle duration
<script>
_inweb.throttleForDays = 30;
</script>
@venkateshwarv
venkateshwarv / inweb-throttling3.html
Created May 16, 2020 11:43
Hide after submission
<script>
_inweb.hideAfterSubmission = true;
</script>