The Wayback Machine - https://web.archive.org/web/20180817091106/https://cds.cern.ch/record/1728506

CERN Accelerating science

  • Imprint: Geneva : CERN, 1962

Published in: CERN Courier Volume 2, Number 11, November 1962


Back to search

', type: 'inline' } }); // $.click won't work, because .social-send button is created dynamically // de-attach other callbacks first $(document).off('click', '.social-send'); $(document).on('click', '.social-send', function(){ // Replace the record's url and @CDS Social with placeholders var message = $('.social-text').val() var newMessage = message.replace('https://web.archive.org/web/20180817091106/https://cds.cern.ch/record/1728506', '{0}') var newMessage = newMessage.replace('@CDS Social', '@{1}') // Disable the button and put a loader image inside $('.social-send').disabled = true $('.social-send').html('') authenticateOnSocial(function(){ postOnSocial(newMessage); }); }); } jQuery( document ).ready(function() { // Determine if user is logged in or not based on the existence of // either 'cern-account' class or 'cern-signout' if($('.cern-account').length) { // User NOT logged in $('.social-button').click(function(){ alert('You have to be signed in to do this!'); }); } else if($('.cern-signout').length) { // User logged in $('.social-button').click(function(){ createMagnificPopup(); }); // attach the magnific popup now createMagnificPopup(); } else { $('.social-button').click(function(){ alert('There was an error, please reload the page and try again. If the error still occurs, please contact [email protected]'); }); } }); // ]]>