MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
}); | }); | ||
/* === | /* === Transight global footer (injects on all pages) === */ | ||
(function () { | mw.loader.using(['mediawiki.util'], function () { | ||
function | $(function () { | ||
// Build footer HTML | |||
'<div id=" | var footerHTML = '\ | ||
<div id="ts-footer" class="ts-footer">\ | |||
<div class="ts-footer__container">\ | |||
<nav class="ts-footer__sitemap">\ | |||
<ul class="ts-footer__col">\ | |||
<li class="ts-footer__title">USE CASES</li>\ | |||
<li><a href="/wiki/Fleet_Telematics">Fleet Telematics</a></li>\ | |||
<li><a href="/wiki/Logistics_and_Delivery">Logistics & Delivery Services</a></li>\ | |||
<li><a href="/wiki/Car_Sharing_Rental_Leasing">Car Sharing, Rental & Leasing</a></li>\ | |||
<li><a href="/wiki/E-Mobility_Management">E-Mobility Management</a></li>\ | |||
<li><a href="/wiki/Driver_Safety">Driver Safety</a></li>\ | |||
</ul>\ | |||
<ul class="ts-footer__col">\ | |||
<li class="ts-footer__title">PRODUCTS</li>\ | |||
<li><a href="/wiki/Trackers">Trackers</a></li>\ | |||
<li><a href="/wiki/Accessories">Accessories</a></li>\ | |||
<li><a href="/wiki/Solutions">Solutions</a></li>\ | |||
</ul>\ | |||
<ul class="ts-footer__col">\ | |||
<li class="ts-footer__title">SUPPORT</li>\ | |||
<li><a href="/wiki/Product_Support">Product Support</a></li>\ | |||
<li><a href="/wiki/Knowledge_Base">Wiki Knowledge Base</a></li>\ | |||
<li><a href="/wiki/Community_Forum">Community Forum</a></li>\ | |||
<li><a href="/wiki/Warranty_and_Repair">Warranty & Repair</a></li>\ | |||
<li><a href="/wiki/EOL_Products">EOL Products</a></li>\ | |||
</ul>\ | |||
<ul class="ts-footer__col">\ | |||
<li class="ts-footer__title">ABOUT US</li>\ | |||
<li><a href="/wiki/Mission_Vision_Values">Mission, Vision & Values</a></li>\ | |||
<li><a href="/wiki/Brand_Guidelines">Brand Guidelines</a></li>\ | |||
<li><a href="/wiki/Career">Career</a></li>\ | |||
<li><a href="/wiki/Contacts">Contacts</a></li>\ | |||
</ul>\ | |||
</nav>\ | |||
<div class="ts-footer__bottom">\ | |||
<p class="ts-footer__legal">© 2024, Transight | <a href="/wiki/Privacy">Privacy</a> | <a href="/wiki/Cookies">Cookies</a> | <a href="/wiki/Policies">All Policies</a></p>\ | |||
<div class="ts-footer__social">\ | |||
<a href="https://facebook.com" target="_blank" rel="noopener">Facebook</a> \ | |||
<a href="https://www.linkedin.com" target="_blank" rel="noopener">LinkedIn</a> \ | |||
<a href="https://x.com" target="_blank" rel="noopener">Twitter</a> \ | |||
<a href="https://youtube.com" target="_blank" rel="noopener">YouTube</a>\ | |||
</div>\ | |||
</div>\ | |||
</div>\ | |||
</div>'; | |||
// Insert just before the default MediaWiki footer (if present). | |||
// If not found, append to <body>. | |||
var $anchor = $('.mw-footer, #footer, .mw-footer-container').first(); | |||
if ($anchor.length) { | |||
// Hide default footer (CSS also hides, but do it here too for safety) | |||
$anchor.hide(); | |||
$anchor.before(footerHTML); | |||
} else { | |||
$('body').append(footerHTML); | |||
} | |||
}); | |||
}); | |||
if ( | |||
} | |||
Revision as of 06:36, 1 September 2025
$(document).ready(function() {
$('input#searchInput').attr('placeholder', 'Search for Transight Wiki');
});
// Open all external links in a new tab
$(document).ready(function () {
$("a.external").attr("target", "_blank");
});
mw.loader.using('mediawiki.util', function () {
// Force small text
document.documentElement.classList.remove('vector-feature-custom-font-size-standard', 'vector-feature-custom-font-size-large');
document.documentElement.classList.add('vector-feature-custom-font-size-small');
// Force wide layout
document.documentElement.classList.remove('vector-feature-limited-width');
document.documentElement.classList.add('vector-feature-wide-width');
});
/* === Transight global footer (injects on all pages) === */
mw.loader.using(['mediawiki.util'], function () {
$(function () {
// Build footer HTML
var footerHTML = '\
<div id="ts-footer" class="ts-footer">\
<div class="ts-footer__container">\
<nav class="ts-footer__sitemap">\
<ul class="ts-footer__col">\
<li class="ts-footer__title">USE CASES</li>\
<li><a href="/wiki/Fleet_Telematics">Fleet Telematics</a></li>\
<li><a href="/wiki/Logistics_and_Delivery">Logistics & Delivery Services</a></li>\
<li><a href="/wiki/Car_Sharing_Rental_Leasing">Car Sharing, Rental & Leasing</a></li>\
<li><a href="/wiki/E-Mobility_Management">E-Mobility Management</a></li>\
<li><a href="/wiki/Driver_Safety">Driver Safety</a></li>\
</ul>\
<ul class="ts-footer__col">\
<li class="ts-footer__title">PRODUCTS</li>\
<li><a href="/wiki/Trackers">Trackers</a></li>\
<li><a href="/wiki/Accessories">Accessories</a></li>\
<li><a href="/wiki/Solutions">Solutions</a></li>\
</ul>\
<ul class="ts-footer__col">\
<li class="ts-footer__title">SUPPORT</li>\
<li><a href="/wiki/Product_Support">Product Support</a></li>\
<li><a href="/wiki/Knowledge_Base">Wiki Knowledge Base</a></li>\
<li><a href="/wiki/Community_Forum">Community Forum</a></li>\
<li><a href="/wiki/Warranty_and_Repair">Warranty & Repair</a></li>\
<li><a href="/wiki/EOL_Products">EOL Products</a></li>\
</ul>\
<ul class="ts-footer__col">\
<li class="ts-footer__title">ABOUT US</li>\
<li><a href="/wiki/Mission_Vision_Values">Mission, Vision & Values</a></li>\
<li><a href="/wiki/Brand_Guidelines">Brand Guidelines</a></li>\
<li><a href="/wiki/Career">Career</a></li>\
<li><a href="/wiki/Contacts">Contacts</a></li>\
</ul>\
</nav>\
<div class="ts-footer__bottom">\
<p class="ts-footer__legal">© 2024, Transight | <a href="/wiki/Privacy">Privacy</a> | <a href="/wiki/Cookies">Cookies</a> | <a href="/wiki/Policies">All Policies</a></p>\
<div class="ts-footer__social">\
<a href="https://facebook.com" target="_blank" rel="noopener">Facebook</a> \
<a href="https://www.linkedin.com" target="_blank" rel="noopener">LinkedIn</a> \
<a href="https://x.com" target="_blank" rel="noopener">Twitter</a> \
<a href="https://youtube.com" target="_blank" rel="noopener">YouTube</a>\
</div>\
</div>\
</div>\
</div>';
// Insert just before the default MediaWiki footer (if present).
// If not found, append to <body>.
var $anchor = $('.mw-footer, #footer, .mw-footer-container').first();
if ($anchor.length) {
// Hide default footer (CSS also hides, but do it here too for safety)
$anchor.hide();
$anchor.before(footerHTML);
} else {
$('body').append(footerHTML);
}
});
});