MediaWiki:Common.js: Difference between revisions
No edit summary Tag: Manual revert |
No edit summary |
||
| Line 16: | Line 16: | ||
document.documentElement.classList.remove('vector-feature-limited-width'); | document.documentElement.classList.remove('vector-feature-limited-width'); | ||
document.documentElement.classList.add('vector-feature-wide-width'); | document.documentElement.classList.add('vector-feature-wide-width'); | ||
}); | |||
/* === Transightee footer injection === */ | |||
mw.loader.using( ['mediawiki.util'] ).then(function () { | |||
var $where = $('#mw-footer').length ? $('#mw-footer') : $('#footer'); // Vector 2022 / legacy | |||
var html = ` | |||
<div class="tg-footer" id="tg-footer"> | |||
<div class="tg-footer__inner"> | |||
<div class="tg-footer__grid"> | |||
<div class="tg-footer__col"> | |||
<h3>Use Cases</h3> | |||
<ul> | |||
<li><a href="/wiki/All_Use_Cases">All use cases</a></li> | |||
<li><a href="/wiki/Fleet_Telematics">Fleet telematics</a></li> | |||
<li><a href="/wiki/Logistics_and_Delivery_Services">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/Utility_and_Emergency_Transport">Utility & emergency transport</a></li> | |||
<li><a href="/wiki/Agriculture_Construction_Mining">Agriculture, construction & mining</a></li> | |||
<li><a href="/wiki/Assets_and_Workforce">Assets & workforce</a></li> | |||
<li><a href="/wiki/Driver_Safety">Driver safety</a></li> | |||
</ul> | |||
</div> | |||
<div class="tg-footer__col"> | |||
<h3>Products</h3> | |||
<ul> | |||
<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> | |||
</div> | |||
<div class="tg-footer__col"> | |||
<h3>Support</h3> | |||
<ul> | |||
<li><a href="/wiki/Product_Support">Product support</a></li> | |||
<li><a href="/wiki/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> | |||
</div> | |||
<div class="tg-footer__col"> | |||
<h3>About Us</h3> | |||
<ul> | |||
<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> | |||
</div> | |||
</div> | |||
<div class="tg-footer__bottom"> | |||
<div>Copyright © 2024, Transightee</div> | |||
<div class="tg-social"> | |||
<a href="https://facebook.com/" aria-label="Facebook">f</a> | |||
<a href="https://linkedin.com/" aria-label="LinkedIn">in</a> | |||
<a href="https://twitter.com/" aria-label="X/Twitter">x</a> | |||
<a href="https://youtube.com/" aria-label="YouTube">▶</a> | |||
<a href="https://instagram.com/" aria-label="Instagram">◎</a> | |||
</div> | |||
</div> | |||
</div> | |||
</div>`; | |||
// Insert our footer at the very end of the page | |||
if ($where.length) { | |||
$where.append(html); | |||
} else { | |||
// Fallback if a skin doesn't have #mw-footer/#footer | |||
$('body').append(html); | |||
} | |||
}); | }); | ||
Revision as of 06:12, 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');
});
/* === Transightee footer injection === */
mw.loader.using( ['mediawiki.util'] ).then(function () {
var $where = $('#mw-footer').length ? $('#mw-footer') : $('#footer'); // Vector 2022 / legacy
var html = `
<div class="tg-footer" id="tg-footer">
<div class="tg-footer__inner">
<div class="tg-footer__grid">
<div class="tg-footer__col">
<h3>Use Cases</h3>
<ul>
<li><a href="/wiki/All_Use_Cases">All use cases</a></li>
<li><a href="/wiki/Fleet_Telematics">Fleet telematics</a></li>
<li><a href="/wiki/Logistics_and_Delivery_Services">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/Utility_and_Emergency_Transport">Utility & emergency transport</a></li>
<li><a href="/wiki/Agriculture_Construction_Mining">Agriculture, construction & mining</a></li>
<li><a href="/wiki/Assets_and_Workforce">Assets & workforce</a></li>
<li><a href="/wiki/Driver_Safety">Driver safety</a></li>
</ul>
</div>
<div class="tg-footer__col">
<h3>Products</h3>
<ul>
<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>
</div>
<div class="tg-footer__col">
<h3>Support</h3>
<ul>
<li><a href="/wiki/Product_Support">Product support</a></li>
<li><a href="/wiki/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>
</div>
<div class="tg-footer__col">
<h3>About Us</h3>
<ul>
<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>
</div>
</div>
<div class="tg-footer__bottom">
<div>Copyright © 2024, Transightee</div>
<div class="tg-social">
<a href="https://facebook.com/" aria-label="Facebook">f</a>
<a href="https://linkedin.com/" aria-label="LinkedIn">in</a>
<a href="https://twitter.com/" aria-label="X/Twitter">x</a>
<a href="https://youtube.com/" aria-label="YouTube">▶</a>
<a href="https://instagram.com/" aria-label="Instagram">◎</a>
</div>
</div>
</div>
</div>`;
// Insert our footer at the very end of the page
if ($where.length) {
$where.append(html);
} else {
// Fallback if a skin doesn't have #mw-footer/#footer
$('body').append(html);
}
});