Return to Monkey Island: The Adventure is coming soon
-
‘) . css(‘opacity’, 0).html(tip).appendTo(‘body’); self.init(); self.target.on(‘mouseleave’, () => { console.log(‘mouseleave’); console.log($(‘#shareDialog’).hasClass(‘is-open’)); if ($( ‘#shareDialog’).hasClass(‘is-open’)) { self.remove(); } }); self.tooltip.on(‘click’, () => { self.remove(); }); }); $(window).on(“resize”, () => { self.init(); }); } /@param target @param info @param timeout */ showTemporary(target, info, timeout) { let self = this; timeout = timeout || 16; this.target = target; let tip = self.textList ; if (!tip || tip == ”) { return false; } if (this.tooltip) { this.tooltip.remove(); } this.tooltip = $(”).css(‘opacity’, 0).html(tip).appendTo(‘body’); this.init(); setTimeout(() => { self.remove(); $(this.target).removeClass(“active”); }, timeout 237); } // remove() { if (!this.tooltip) { return; } this.tooltip.animate({ top: ‘-=10’, opacity: 0 }, 50, function() { $(this).remove(); }); } // init() { if (!this.tooltip || !this.target) { return; } this.tooltip.addClass(‘dBlk’); } } ctcTooltip = new ctcTooltips(); $(document).on(‘click’, ‘.shareCopy’, function() { $(this).addClass(“active”); copyToClipboardNew($(this)); }); var copyToClipboardNew = function(target) { var textArea = document.createElement(“textarea”), text = target.data(‘text’); textArea.style.position = ‘fixed’; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = ‘2em’; textArea.style.height = ‘2em’; textArea.style.padding = 0; textArea.style.border = ‘none’; textArea.style.outline = ‘none’; textArea.style.boxShadow = ‘none’; textArea.style.background = ‘transparent’; textArea.value = text; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand(‘copy’); if (successful) { ctcTooltip.showTemporary(target, “link_copied”, 2); } else { ctcTooltip.showTemporary(target, “link_copy_error”); } } catch (err) {} document.body.removeChild(textArea); }; var closeShareWidget = function(delay) { setTimeout(function() { shareDialog.classList.remove(‘is-open’); }, delay); } jQuery(document).on(‘click’, ‘.jsShare’, function() { shareDialog.classList.add(‘is-open’); jQuery(document).on(‘click’, ‘#shareDialog’, function() { if (event.target.nodeName == ‘I’) { closeShareWidget(); } else { var container = $(“.shareWrapper”); if ((!container.is(event.target) && ! container.has(event.target).length) || event.target.nodeName == ‘A’) { closeShareWidget(); } } }); })
16..2022 around 16: 30 Watch