Skip to content

Instantly share code, notes, and snippets.

View arturmkrtchyan's full-sized avatar

Artur Mkrtchyan arturmkrtchyan

View GitHub Profile
@arturmkrtchyan
arturmkrtchyan / send-to-aws.js
Last active June 28, 2022 21:53
send-to-aws
<script>
document.addEventListener("DOMContentLoaded", function() {
$('#sw-form-capture-submit-btn').unbind('click');
$('#sw-form-capture-submit-btn').click(function(event){
disableButtonClick();
sendToAWS();
});
function sendToAWS() {
<script>
document.addEventListener("DOMContentLoaded", function () {
let recordId = getUrlParam('recordId');
var exitCondition = setInterval(function() {
$('a').each(function() {
if($(this).attr('href') && $(this).attr('href').endsWith('{URL_PARAM:recordId}')) {
const url = $(this).attr('href').replace('{URL_PARAM:recordId}', recordId);
$(this).attr('href', url);
}
});
@arturmkrtchyan
arturmkrtchyan / custom_upvote.html
Last active December 9, 2021 01:34
Custom Upvote
<script>
document.addEventListener("DOMContentLoaded", function() {
const pageId = 'c677b3ed-03d1-462a-a1b4-c78bd71bb8e3';
const applicationId = '8d4648c7-85ec-4901-bb16-a1d99e6f7b9e';
const baseId = 'appbQWhGxkZUzMwzP';
const candidatesTableName = 'Candidature(s)';
const votesTableName = 'Votes';
const votesUrl = 'https://' + window.location.hostname + '/v1/integrations/airtable/' + applicationId + '/' + baseId + '/' + votesTableName + '/records/new';
@arturmkrtchyan
arturmkrtchyan / email-label-tmp-fix.js
Created November 21, 2021 22:30
Email label and Phone number fix
<script>
document.addEventListener("DOMContentLoaded", function() {
setInterval(function() {
const telNumebers = $('.js-list-item a:contains("Url label")');
telNumebers.each(function(){
const number = $(this).attr('href');
if(number == 'tel:') {
$(this).css('display', 'none');
} else {
$(this).html(number.replace('tel:', ''));
<div class="pricing-table">
<div class="pricing-header d-flex flex-wrap align-items-center">
<div class="column--first table-name">
<div class="pricing-title sw-pricing-title--big sw-font-family-default">Features</div>
</div>
<div class="sw-pricing-column sw-font-family-default">
<div class="pricing-title">Free</div>
</div>
<div class="sw-pricing-column sw-font-family-default">
<div class="pricing-title">Starter</div>
@arturmkrtchyan
arturmkrtchyan / remove-auth-token-in-30-mins.js
Created November 1, 2021 22:05
Remove Auth Token In 30 mins
<script>
document.addEventListener("DOMContentLoaded", function() {
const jwtToken = getCookie('jwtToken');
setCookie('jwtToken', jwtToken, 30);
function setCookie(name, value, minutes) {
var date = new Date();
date.setTime(date.getTime() + (minutes * 60 * 1000));
var expires = "expires="+ date.toUTCString();
document.cookie = name + "=" + value + ";" + expires + ";path=/;" + "SameSite=None; Secure";
@arturmkrtchyan
arturmkrtchyan / get_record_id.js
Created October 17, 2021 16:01
get_record_id.js
<script>
document.addEventListener("DOMContentLoaded", function() {
const recordId = getUrlParam('recordId');
console.log(recordId);
function getUrlParam(name) {
const url = new URL(window.location.href);
let param;
for (var key of url.searchParams.keys()) {
<script>
/** this needs to be changed if block ids get changed score fields get changed **/
const blockMapping = {
'list-details7': {
'field1' : 'F.O.R. Score',
'field2' : 'Status FOR'
},
'list-details6': {
'field1' : 'High Score 4',
'field2' : 'Test 4 Status'
<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
{
"tables": [
{
"id": "tbl2g31JZOaP5v35E",
"name": "Jobs",
"primaryFieldId": "fldKWJFMfX27nTZAw",
"fields": [
{
"type": "singleLineText",
"id": "fldKWJFMfX27nTZAw",