Find below an ever expanding collection of JS customizations that have been developed by Krowden team members and customers.
// Edit Profile change company field into something else //
$('label[for=company').each(function(){
var text = $(this).text();
text = ('Faculty or department');
$(this).text(text);
});
// change company into faculty in modal //
$("#ModalRegister > div > div > div.modal-body > form > div:nth-child(11) > div > input").attr('placeholder','Faculty or department');
$("#ModalViewProfile > div > div > div.modal-body > div > div:nth-child(4) > div.col-xs-4 > small").text("Faculty or department");
//Add an attendee list to the top right corner //
$(function(){
$('div.pull-right').prepend('<a href="/event-attendees" class="btn btn-md btn-color3 m-b-sm m-t-sm makefull"><i class="fa fa-user" aria-hidden="true"></i> Attendees List</a>');
});
// Show a registration popup instead of login (this activates registration module) //
$("a[data-target='#ModalRequestLogin'").attr("data-target","#ModalRegister");
var successAlerts = $('div.alert-success');
if(successAlerts.length > 0){
successAlerts.each(function(){
var message = $(this).text();
if (message.indexOf('Please check your email inbox for a link to automatically sign in') > -1) {
$('#ModalRegister').modal('hide');
}
});
}
$('#ModalRegister div.modal-body').append('</br>OR</br></br><button type="button" class="btn btn-color2 btn-md submit" data-toggle="modal" data-target="#ModalRequestLogin" data-dismiss="modal">Request login link</button>');
β// Hiding all social media buttons and comment features
$("a[data-target='#ModalShareSession'").attr("data-toggle","");
$('div.share-btns').hide()
$(".fb-comments").addClass('hide');
// Hiding footer
$("div.userfooter").hide();
β// Hiding connect button & My connections (in dropdown) //
$("a[data-link-form='Connect'").hide();
$("a[href*='/my-connections'").hide();
$("a[data-ajax-link-form='Connect'").hide();
// hide 'spread the word' //
$("div[class='panel-footer text-center p-b-xs p-t-sm bg-white']").hide();
// Hide Calendars
$('.fa-calendar').parent().hide();
// Hide print button //
$("[data-print-init]").hide();
// Hide the attendees in sessions //
$('div.session-guests').hide('');
// Hide event title //
$("#page-content-wrapper > div.content > div:nth-child(1) > h1").hide('');
// Remove the checkboxes from the session overview page //
$("div[data-role='event-checkmarks']").hide();
// VIDEO CONFERENCE ROOM CHANGE IT TO WELCOME //
$('.panel-heading').each(function(){
var text = $(this).text();
text = text.replace('Video conferencing room','Welcome');
$(this).text(text);
});
// Change wording Guests attending this workshop into Table Attendees //
$('.panel-heading').each(function(){
var text = $(this).text();
text = text.replace('Guests attending this workshop','Table Attendees');
$(this).text(text);
});
// hide gender fields//
$(function(){
if(location.pathname.indexOf('/edit-profile')>-1){
$('div.col-md-6 div:eq(7)').css("display", "none");
$('div.col-md-6 div:eq(8)').css("display", "none");
}
});
$("#page-content-wrapper > div.content > div > div:nth-child(2) > div.row").hide('')
// hide search button//
$("#page-content-wrapper > div.content > div:nth-child(1) > div.row").hide('')
// Hide last two fields from edit profile //
$(function(){
if(location.pathname.indexOf('/edit-profile')>-1){
$("#page-content-wrapper > div.content > div > div > form > div > div > div:nth-child(12)").hide('');
$("#page-content-wrapper > div.content > div > div > form > div > div > div:nth-child(13)").hide('');
}
});
// lock the following fields //
$("input[id='firstName'").prop( "disabled", true);
$("input[id='lastName'").prop( "disabled", true);
$("input[id='company'").prop( "disabled", true);
$("input[id='jobtitle'").prop( "disabled", true);
$("input[id='email'").prop( "disabled", true);
// Timezone script: displaying sessions in users their local timezone //
$(document).ready(function() {
// Timezone function
addTimeZone2();
// Add timezone to seat page
addTimeZoneSeatPage();
// Add timezone to my session page
addTimeZoneMySessionPage();
})
// Timezone script: displaying sessions in users their local timezone //
function addTimeZone2() {
moment.tz.setDefault(window.nContext.event.timezone);
$('.nt-session .text.text-clipped').find('strong:first').each(function(index, element) {
var date = $(this).html();
date = date.split(" - ").map(function(item) {
return item.trim();
});
console.log(date[0]);
var convertDate = moment(date[0]).tz(moment.tz.guess()).format('DD-MM-YYYY HH:mm');
var currentDate = moment(date[0]).format('DD-MM-YYYY');
console.log(convertDate);
if (true) {
convertDate = moment(date[0], ['DD-MM-YYYY HH:mm','MM-DD-YYYY hh:mm a']).tz(moment.tz.guess()).format('DD-MM-YYYY HH:mm');
currentDate = moment(date[0], ['DD-MM-YYYY HH:mm','MM-DD-YYYY hh:mm a']).format('DD-MM-YYYY');
console.log(convertDate);
}
if (true) {
var endTime = currentDate + ' ' + date[1];
var convertTime = moment(endTime).tz(moment.tz.guess()).format('HH:mm');
if (true) {
convertTime = moment(endTime, ['DD-MM-YYYY HH:mm','DD-MM-YYYY hh:mm a']).tz(moment.tz.guess()).format('HH:mm');
}
convertDate = convertDate + ' - ' + convertTime
}
convertDate = convertDate + ' ' + moment.tz(moment.tz.guess()).format('z');
$(this).html(convertDate);
});
moment.tz.setDefault(moment.tz.guess());
}
function addTimeZoneSeatPage() {
moment.tz.setDefault(window.nContext.event.timezone);
$('[data-role="session_range"]').each(function(index, element) {
var date = $(this).html();
date = date.split(" - ").map(function(item) {
return item.trim();
});
console.log(date[0]);
var convertDate = moment(date[0]).tz(moment.tz.guess()).format('DD-MM-YYYY HH:mm');
var currentDate = moment(date[0]).format('DD-MM-YYYY');
console.log(convertDate);
if (true) {
convertDate = moment(date[0], ['DD-MM-YYYY HH:mm','MM-DD-YYYY hh:mm a']).tz(moment.tz.guess()).format('DD-MM-YYYY HH:mm');
currentDate = moment(date[0], ['DD-MM-YYYY HH:mm','MM-DD-YYYY hh:mm a']).format('DD-MM-YYYY');
console.log(convertDate);
}
if (true) {
var endTime = currentDate + ' ' + date[1];
var convertTime = moment(endTime).tz(moment.tz.guess()).format('HH:mm');
if (true) {
convertTime = moment(endTime, ['DD-MM-YYYY HH:mm','DD-MM-YYYY hh:mm a']).tz(moment.tz.guess()).format('HH:mm');
}
convertDate = convertDate + ' - ' + convertTime
}
convertDate = convertDate + ' ' + moment.tz(moment.tz.guess()).format('z');
$(this).html(convertDate);
});
moment.tz.setDefault(moment.tz.guess());
}
function addTimeZoneMySessionPage() {
moment.tz.setDefault(window.nContext.event.timezone);
$('#MySessionsTable [data-role="meeting-datetime-range-date"]').each(function(index, element) {
var date = $(this).html();
date = date.split(" - ").map(function(item) {
return item.trim();
});
console.log(date[0]);
var convertDate = moment(date[0]).tz(moment.tz.guess()).format('DD-MM-YYYY HH:mm');
var currentDate = moment(date[0]).format('DD-MM-YYYY');
console.log(convertDate);
if (true) {
convertDate = moment(date[0], ['DD-MM-YYYY HH:mm','MM-DD-YYYY hh:mm a']).tz(moment.tz.guess()).format('DD-MM-YYYY HH:mm');
currentDate = moment(date[0], ['DD-MM-YYYY HH:mm','MM-DD-YYYY hh:mm a']).format('DD-MM-YYYY');
console.log(convertDate);
}
if (true) {
var endTime = currentDate + ' ' + date[1];
var convertTime = moment(endTime).tz(moment.tz.guess()).format('HH:mm');
if (true) {
convertTime = moment(endTime, ['DD-MM-YYYY HH:mm','DD-MM-YYYY hh:mm a']).tz(moment.tz.guess()).format('HH:mm');
}
convertDate = convertDate + ' - ' + convertTime
}
convertDate = convertDate + ' ' + moment.tz(moment.tz.guess()).format('z');
$(this).html(convertDate);
});
moment.tz.setDefault(moment.tz.guess());
}
// HIDE EVENT LOCATION WHEN IN SESSION
$(function(){
if(location.pathname.indexOf('/session/')>-1){
$( ".panel-default:contains('Location')" ).css( "display", "none" );
}
});
// Replacing the Video Conferencing Url's with another text in My-Sessions //
//Get all links in My Session & replace them
var links = document.getElementById('MySessionsTable');
if (links) {
links = links.getElementsByTagName('a');
}
//loop through links
for(i in links){
if(links[i].target=="_blank"){
//if link opens new tab, change to self
links[i].target="_self"
}
var linkText = links[i].innerHTML;
if(linkText){
if(linkText.indexOf("http") !== -1){
// replace any link text that contains urls to Go to Session
links[i].innerHTML = 'Go to Session'
}
}
}
// function to display sponsors connect / company profile button //
In the script below change the id "15910" to the session group ID that you have your "sponsors" listed as 1on1 meeting sessions with 2 seats & add this script to the JS customization:
$('div.tab-pane[data-group=15910]').find('div.nt-session[data-session-type=DATES]').each(function(){var title = $(this).find('.nt-session-title'); var sessionId = $(title).attr('data-session-id'); var fragmentId = $(title).attr('data-fragment-id'); var profileURL = $(this).attr('data-conference-link'); if(typeof(profileURL)!='undefined'){var hostSpan = $(this).find('div.text-clipped > span[data-session-host-wrap]').detach();$(this).find('div.text-clipped').empty().append(hostSpan).append('<br><a href="'+profileURL+'" class="btn btn-color2 center" target="_blank">Company profile</a><div class="clearfix m-t-xs"></div>');} if(typeof(sessionId)!='undefined' && typeof(fragmentId)!='undefined') {$('a[data-view-session-type=DATES][data-fragment-id='+sessionId+']').replaceWith($('div#ModalViewProfile').find('div[data-fragment-id='+fragmentId+']').find('a[data-ajax-url=connect-attendee]').clone(true,true));}});
// show sponsor image in the waiting room //
In the script below it is essential to change the Imgur link to your own Imgur link.
$("#page-content-wrapper > div.content > div.panel.panel-default.workshop-waiting-room > div.panel-body").append('</br><img src="https://i.imgur.com/WlLNKXg.png" style="width:50%; height:50%"></img>');
Don't index site on Google:
// don't index site in google //
$('head').append('<meta name="robots" content="noindex">');
// change join button into watch session //
$(function(){
if(location.pathname.indexOf('/session/')>-1){
$("#page-content-wrapper > div.sidebar.admin-navbar > div.invite-attendees > a").text("Watch Session");
}
});
// Quick join button //
$('[data-target="#ModalQuickJoinSession"]').show();
$('[data-target="#ModalQuickJoinSession"]').text("+ Join");
$('[data-target="#ModalQuickJoinSession"]').addClass("btn-color3");
// add support room button //
// support room //
$(function(){
if(location.pathname.indexOf('/')>-1){
$('<div class="panel panel-default hidden-xs"><div class="panel-heading text-center">Technical issues?</div><div class="panel-body"><div class="user-image"><div class="user-circle" style=" background-image: url(https://fiverr-res.cloudinary.com/images/q_auto,f_auto/gigs/141159469/original/331ba84162bed48d2dd725c4e625accaaea9b64f/resolve-technical-issue-quickly.jpg);"></div></div><div class="clearfix"></div><div class="text-center m-t-md"><p>Do you have any technical issues or need some help? We are available to support you in a Zoom Room! </br><a href="https://krowden.com/zoom-igor" class="btn btn-sm btn-color1 m-t-md">Join Zoom Room</a><br><br></div> </div></div>').appendTo('.sidebar')
}
});
// add custom image to session description specific to session //
$(function() {
if (location.pathname.indexOf('/session/INSERTSESSIONID')>-1) {
$(`
<br><div class="text-center"><img class="sponsor-image" src="https:/IMAGEURLHERE" /></div>`)
.appendTo('.sponsor-panel-body');
}
})
// add custom URL/VIDEO to session description specific to session //
$(function() {
if (location.pathname.indexOf('/session/INSERTSESSIONID')>-1) {
$('.panel-body h1').after(`<p><a href="https://youtu.be/YOUTUBEID">Click here to view this poster's video</a></p><p><a href="https://INSERTFILEURL">Click here to view this poster's abstract</a></p>`);
}
})