| 1 |
"use strict"; |
| 2 |
|
| 3 |
; |
| 4 |
(function ($, window, document, undefined) { |
| 5 |
'use strict'; |
| 6 |
|
| 7 |
$(document).ready(function () { |
| 8 |
$('[data-id="links"] input[type="text"]').each(function () { |
| 9 |
$(this).on('change keyup', function () { |
| 10 |
var input = $(this).val(); |
| 11 |
var layout = $(this).closest('.layout'); |
| 12 |
var socialMediaIcons = ['facebook', 'instagram', 'twitter', 'tiktok', 'pinterest', 'whatsapp', 'telegram', 'flickr', 'linkedin', 'youtube', 'discord', 'xing', 'dribble', 'vk', 'weibo', 'vimeo', 'mix', 'behance', 'spotify', 'soundcloud', 'twitch', 'etsy', 'bandcamp', 'reddit', 'github', 'bsky']; |
| 13 |
for (var i = 0; i < socialMediaIcons.length; i++) { |
| 14 |
var socialMediaIcon = socialMediaIcons[i]; |
| 15 |
if (input.includes(socialMediaIcon)) { |
| 16 |
layout.find('input[type=radio][value="' + socialMediaIcon + '"]').prop('checked', true); |
| 17 |
} |
| 18 |
} |
| 19 |
}); |
| 20 |
}); |
| 21 |
}); |
| 22 |
})(jQuery, window, document); |