Powered For {console.log("Shared")});
} else {
$('.share-box').addClass('active');
$('.backdrop').addClass('active');
$('.share-tabs .share-tab.social').addClass('active');
$('.share-tabs .share-tab.embed').removeClass('active');
$('.share-box .share-content.social').addClass('active');
$('.share-box .share-content.embed').removeClass('active');
}
}
function activeEmbedShare() {
$('.share-box').addClass('active');
$('.backdrop').addClass('active');
$('.share-tabs .share-tab.embed').addClass('active');
$('.share-tabs .share-tab.social').removeClass('active');
$('.share-box .share-content.embed').addClass('active');
$('.share-box .share-content.social').removeClass('active');
}
$('.share-action').bind('click', activeSocialShare);
$('.embed-action').bind('click', activeEmbedShare);
$('.share-box .btn.close').bind('click', function(){
$('.share-box').removeClass('active');
$('.backdrop').removeClass('active');
$('#copy-link-btn').text('Copy');
$('#copy-embed-btn').text('Copy Code');
});
$('.share-tab.social').bind('click', activeSocialShare);
$('.share-tab.embed').bind('click', activeEmbedShare);
$('#copy-link-btn').tooltip();
$('#copy-link-btn-2').tooltip();
$('#copy-link-btn').bind('click', function(){
const currentFocus = document.activeElement;
let input = document.querySelector('#copy-link');
input.focus();
input.setSelectionRange(0, input.value.length + 1);
try {
let success = document.execCommand('copy');
if(success) {
console.log("COPY LINK")
$('#copy-link-btn').trigger('copied', ['Copied!']);
} else {
console.log("COPY FAIL")
$('#copy-link-btn').trigger('copied', ['Copy with Ctrl-c']);
}
} catch(err) {
console.log("COPY ERR")
$('#copy-link-btn').trigger('copied', ['Copy with Ctrl-c']);
}
if(currentFocus && typeof currentFocus.focus === 'function') {
currentFocus.focus();
}
})
$('#copy-link-btn-2').bind('click', function(){
const currentFocus = document.activeElement;
let input = document.querySelector('#copy-link-2');
input.focus();
input.setSelectionRange(0, input.value.length + 1);
try {
let success = document.execCommand('copy');
if(success) {
console.log("COPY LINK")
$('#copy-link-btn-2').trigger('copied', ['Copied!']);
} else {
console.log("COPY FAIL")
$('#copy-link-btn-2').trigger('copied', ['Copy with Ctrl-c']);
}
} catch(err) {
console.log("COPY ERR")
$('#copy-link-btn-2').trigger('copied', ['Copy with Ctrl-c']);
}
if(currentFocus && typeof currentFocus.focus === 'function') {
currentFocus.focus();
}
})
$('#copy-link-btn').bind('copied', function(event, message){
$(this)
.text(message)
.tooltip('hide')
.attr('title', message)
.tooltip('show')
.tooltip('toggleEnabled')
.attr('title', 'Copy to Clipboard');
})
$('#copy-link-btn-2').bind('copied', function(event, message){
$(this)
.text(message)
.tooltip('hide')
.attr('title', message)
.tooltip('show')
.tooltip('toggleEnabled')
.attr('title', 'Copy to Clipboard');
})
$('#copy-embed-btn').tooltip();
$('#copy-embed-btn-2').tooltip();
$('#copy-embed-btn').bind('click', function(){
const currentFocus = document.activeElement;
let input = document.querySelector('#embed-link');
input.focus();
input.setSelectionRange(0, input.value.length + 1);
try {
let success = document.execCommand('copy');
if(success) {
console.log("COPY LINK")
$('#copy-embed-btn').trigger('copied', ['Copied!']);
} else {
console.log("COPY FAIL")
$('#copy-embed-btn').trigger('copied', ['Copy with Ctrl-c']);
}
} catch(err) {
console.log("COPY ERR")
$('#copy-embed-btn').trigger('copied', ['Copy with Ctrl-c']);
}
if(currentFocus && typeof currentFocus.focus === 'function') {
currentFocus.focus();
}
})
$('#copy-embed-btn-2').bind('click', function(){
const currentFocus = document.activeElement;
let input = document.querySelector('#embed-link-2');
input.focus();
input.setSelectionRange(0, input.value.length + 1);
try {
let success = document.execCommand('copy');
if(success) {
console.log("COPY LINK")
$('#copy-embed-btn-2').trigger('copied', ['Copied!']);
} else {
console.log("COPY FAIL")
$('#copy-embed-btn-2').trigger('copied', ['Copy with Ctrl-c']);
}
} catch(err) {
console.log("COPY ERR")
$('#copy-embed-btn-2').trigger('copied', ['Copy with Ctrl-c']);
}
if(currentFocus && typeof currentFocus.focus === 'function') {
currentFocus.focus();
}
})
$('#copy-embed-btn').bind('copied', function(event, message){
$(this)
.text(message)
.tooltip('hide')
.attr('title', message)
.tooltip('show')
.tooltip('toggleEnabled')
.attr('title', 'Copy to Clipboard');
})
$('#copy-embed-btn-2').bind('copied', function(event, message){
$(this)
.text(message)
.tooltip('hide')
.attr('title', message)
.tooltip('show')
.tooltip('toggleEnabled')
.attr('title', 'Copy to Clipboard');
})
});