MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / initShortlinkInfoButton

Function initShortlinkInfoButton

static/main.ts:530–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

528}
529
530function initShortlinkInfoButton() {
531 if (options.metadata?.['ogCreated']) {
532 const buttonText = $('.shortlinkInfoText');
533 const dt = new Date(options.metadata['ogCreated']);
534 buttonText.html('');
535
536 const button = $('.shortlinkInfo');
537 BootstrapUtils.initPopover(button, {
538 html: true,
539 title: 'Link created',
540 content: formatISODate(dt, true),
541 template:
542 '<div class="popover" role="tooltip">' +
543 '<div class="arrow"></div>' +
544 '<h3 class="popover-header"></h3><div class="popover-body"></div>' +
545 '</div>',
546 });
547
548 showShortlinkInfoButton();
549 }
550}
551
552function sizeCheckNavHideables() {
553 const nav = $('nav');

Callers 1

Calls 2

formatISODateFunction · 0.85
showShortlinkInfoButtonFunction · 0.85

Tested by

no test coverage detected