Skip to content

Instantly share code, notes, and snippets.

Avatar

Artur Mkrtchyan arturmkrtchyan

View GitHub Profile
View pricing.css
<style>
#pricing9584 .sw-pricing-column{ max-width: 18%; flex: 0 0 18%; text-align: center; padding: 16px 15px; box-sizing: border-box; } #pricing9584 .pricing-table .features:not(.buttons-row):hover{ background-color: #f3f4f8; } #pricing9584 .pricing-table .features{ align-items: baseline; } #pricing9584 .pricing-table { border-top: 1px solid #f3f4f8; padding: 30px 0; } #pricing9584 .pricing-header { margin-bottom: .83333333vw; } #pricing9584 .table-name{ font-weight: 500; } #pricing9584 .column--first{ max-width: 28%; flex: 0 0 28%; text-align: left; color: #1C2B41; font-size: 18px; padding: 10px 12px; } #pricing9584 .pricing-tier{ font-size: 18px; } #pricing9584 .pricing-title{ color: #1C2B41; position: relative; font-size: 1.16666667vw; line-height: 1.66666667vw; font-weight: 500; } #pricing9584 .sw-pricing-title--big{ font-size: 1.5vw; line-heig
View airtable_meta_api.json
{
"tables": [
{
"id": "tbl2g31JZOaP5v35E",
"name": "Jobs",
"primaryFieldId": "fldKWJFMfX27nTZAw",
"fields": [
{
"type": "singleLineText",
"id": "fldKWJFMfX27nTZAw",
View button_action.html
<script>
document.addEventListener("DOMContentLoaded", function () {
const targetBaseId = 'appO7onHaqjgFdVvW';
const targetTableName = 'Button%20test';
const applicationId = 'b79530b9-83c5-41ca-801e-507d2b8e8fc5';
/* Intercept into Airtable call */
window['records'] = [];
$.ajaxSetup({
View top-banner-code.html
<style>
#sw-banner {
background-color: #69C3FF;
color: #181818;
width: 100%;
display: block;
padding-top: 8px;
padding-bottom: 8px;
-webkit-transition: background-color 200ms ease-in-out;
View hide_filters_based_on_other_filter_selections.md
<script>
    document.addEventListener("DOMContentLoaded", function() {
        $('.js-filter').eq(2).addClass('d-none');
        $('.js-filter').eq(3).addClass('d-none');

        $('.js-filter-option').click(function(){
            setTimeout(function(){
                let containsShoes = false;
                let containsJeansOrPants = false;
View get_airtable_records.js
function getAirtableData(callback) {
const url = 'https://{-your-domain-}/v1/airtable/{your-application-id}/{your-airtable-base-id}/{your-airtable-table-name}/records';
$.ajax({
url: url,
type: 'POST',
dataType: 'json',
contentType: 'application/json; charset=utf-8',
data: JSON.stringify({
sortResources: [
],
View convert_email_capture_to_search.md

Part 1 (Start page with hero)

<script>
    document.addEventListener("DOMContentLoaded", function() {
        $('#sw-email-capture-submit-btn').unbind('click');
        $('#sw-email-capture-submit-btn').click(function(event){
            event.preventDefault();
            const domain = window.location.host;
            const searchValue = $('#sw-email-capture-email-input').val();
View change_form_to_arabic.js
<script>
document.addEventListener("DOMContentLoaded", function () {
$('#form1 .row div.col-12.col-md-4').addClass('text-right').addClass('order-1');
});
</script>
View get_url_param_and_filter.js
<script>
document.addEventListener("DOMContentLoaded", function() {
const category = getUrlParam('category');
if(category) {
const existCondition = setInterval(function() {
if ($('span[data-value="' + category.trim() + '"]').length) {
$('span[data-value="' + category.trim() + '"]').click();
clearInterval(existCondition);
}
}, 100);
View add_user_email_to_zapier.js
<script>
document.addEventListener("DOMContentLoaded", function () {
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
console.log(options);
if(options.url.includes('hooks.zapier.com')) {
const data = JSON.parse(originalOptions.data);
data['LOGGED_IN_USER_EMAIL'] = getUserEmail();
options.data = JSON.stringify(data);
}
});