1 function openShareUrl(url, initialWidth = 640, initialHeight = 480) {
 
   2   const width = Math.max(100, Math.min(screen.width, initialWidth));
 
   3   const height = Math.max(100, Math.min(screen.height, initialHeight));
 
   5   const left = screenLeft + ((outerWidth - width) / 2);
 
   6   const top = screenTop + ((outerHeight - height) / 2);
 
   7   const opts = `width=${width},height=${height},left=${left},top=${top},menubar=no,status=no,location=no`;
 
   9   window.open(url, "popup", opts);
 
  12 $(document).ready(function () {
 
  13   $(".ssb-icon").on("click", function (e) {
 
  14     const shareUrl = $(this).attr("href");
 
  15     if (!shareUrl.startsWith("mailto:")) {
 
  17       openShareUrl(shareUrl);