MediaWiki:Common.js: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
| (10 intermediate revisions by the same user not shown) | |||
Line 26:
/**
* @source https://www.mediawiki.org/wiki/Snippets/Load_JS_and_CSS_by_URL
* @rev 6
*/
Line 124:
// CapSach — Sticky TOC overlay (UNRESTRICTED: Works on iPad/Desktop/Mobile)
(function () {
// 1. REMOVED the "min-width: 768px" check. Now runs everywhere.
Line 220:
// Force button display immediately
btn.style.display = 'flex';
btn.addEventListener('click', openOverlay);
Line 317:
// Check if the button already exists to prevent duplicates
if ($('#custom-email-btn').length === 0) {
// Create the email button element
var emailBtn = $('<a>', {
id: 'custom-email-btn',
href: 'mailto:
// Simple accessible title
title: 'Contact AXA BRAIN Services'
Line 331:
});
/*
$(document).ready(function() {
$('.fullscreen-logo').css('cursor', 'pointer').click(function(e) {
e.preventDefault();
// Method 1: Click the AI Assistant floating icon
var $aiButton = $('img[src*="ai-icon.png"]').closest('div, button, a');
if ($aiButton.length > 0) {
$aiButton.trigger('click');
return;
▲ }
// Method 2: Try the extension's trigger class
var $trigger = $('.ext-aiassistant-trigger, .ext-aiassistant');
if ($trigger.length > 0) {
$trigger.first().trigger('click');
return;
}
console.log("AXA BRAIN Assistant button not found on this page.");
});
});
/* Inline footnotes ({{footnote}}) need NO JavaScript: the note is shown by
the browser's native title tooltip on desktop and a CSS attr(title) bubble
on touch (see MediaWiki:Common.css .ed-fn rules). */
| |||