Difference between revisions of "MediaWiki:Mobile.js"
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Entertainment" \ | <a href="https://wiki.recessim.com/view/Entertainment" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Entertainment</span> \ | <span>Entertainment</span> \ | ||
</a> \ | </a> \ | ||
Line 34: | Line 34: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Home" \ | <a href="https://wiki.recessim.com/view/Home" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Home</span> \ | <span>Home</span> \ | ||
</a> \ | </a> \ | ||
Line 40: | Line 40: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Industrial" \ | <a href="https://wiki.recessim.com/view/Industrial" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Industrial</span> \ | <span>Industrial</span> \ | ||
</a> \ | </a> \ | ||
Line 46: | Line 46: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Wearable" \ | <a href="https://wiki.recessim.com/view/Wearable" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Wearable</span> \ | <span>Wearable</span> \ | ||
</a> \ | </a> \ | ||
Line 62: | Line 62: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Basic_Tools" \ | <a href="https://wiki.recessim.com/view/Basic_Tools" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Basic</span> \ | <span>Basic</span> \ | ||
</a> \ | </a> \ | ||
Line 74: | Line 74: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Mechanical_Tools" \ | <a href="https://wiki.recessim.com/view/Mechanical_Tools" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Mechanical</span> \ | <span>Mechanical</span> \ | ||
</a> \ | </a> \ | ||
Line 80: | Line 80: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Software_Tools" \ | <a href="https://wiki.recessim.com/view/Software_Tools" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Software</span> \ | <span>Software</span> \ | ||
</a> \ | </a> \ | ||
Line 97: | Line 97: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Literature" \ | <a href="https://wiki.recessim.com/view/Literature" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Literature</span> \ | <span>Literature</span> \ | ||
</a> \ | </a> \ | ||
Line 109: | Line 109: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Conferences" \ | <a href="https://wiki.recessim.com/view/Conferences" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Conferences</span> \ | <span>Conferences</span> \ | ||
</a> \ | </a> \ | ||
Line 115: | Line 115: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/People" \ | <a href="https://wiki.recessim.com/view/People" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>People</span> \ | <span>People</span> \ | ||
</a> \ | </a> \ | ||
Line 121: | Line 121: | ||
<li> \ | <li> \ | ||
<a href="https://wiki.recessim.com/view/Other_Sites" \ | <a href="https://wiki.recessim.com/view/Other_Sites" \ | ||
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
<span>Other Sites</span> \ | <span>Other Sites</span> \ | ||
</a> \ | </a> \ | ||
Line 129: | Line 129: | ||
<ul> \ | <ul> \ | ||
<li> \ | <li> \ | ||
− | <a href="/ | + | <a href="https://forum.recessim.com/" \ |
− | class="mw-ui-icon mw-ui-icon-before mw-ui-icon- | + | class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \ |
− | <span> | + | <span>Forum</span> \ |
</a> \ | </a> \ | ||
</li> \ | </li> \ |
Revision as of 03:42, 17 October 2020
/* Any JavaScript here will be loaded for users using the mobile site */
var timer = setInterval(function() {
if ($('.menu ul:first').length) {
console.log("mobile menu exists");
clearInterval(timer);
$('.menu ul:first').after(
'<ul class="level1"> \
<li> \
<a href="#" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-mf-expand mw-ui-icon-small"> \
<span>Categories</span> \
</a> \
</li> \
<ul class="level2"> \
<li> \
<a href="https://wiki.recessim.com/view/Amateur_Radio" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Amateur Radio</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Automotive" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Automotive</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Entertainment" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Entertainment</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Home" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Home</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Industrial" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Industrial</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Wearable" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Wearable</span> \
</a> \
</li> \
</ul> \
</ul> \
<ul class="level1"> \
<li> \
<a href="#" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-mf-expand mw-ui-icon-small"> \
<span>Reversing Tools</span> \
</a> \
</li> \
<ul class="level2"> \
<li> \
<a href="https://wiki.recessim.com/view/Basic_Tools" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Basic</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Electronic_Tools" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Electronic</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Mechanical_Tools" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Mechanical</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Software_Tools" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Software</span> \
</a> \
</li> \
</ul> \
</ul> \
<ul> \
<ul class="level1"> \
<li> \
<a href="#" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-mf-expand mw-ui-icon-small"> \
<span>Resources</span> \
</a> \
</li> \
<ul class="level2"> \
<li> \
<a href="https://wiki.recessim.com/view/Literature" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Literature</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Video" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Video</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Conferences" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Conferences</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/People" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>People</span> \
</a> \
</li> \
<li> \
<a href="https://wiki.recessim.com/view/Other_Sites" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Other Sites</span> \
</a> \
</li> \
</ul> \
</ul> \
<ul> \
<li> \
<a href="https://forum.recessim.com/" \
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-minerva-mapPin"> \
<span>Forum</span> \
</a> \
</li> \
</ul>'
);
$(".menu").find(".level2").hide(); // hide level2 until level1 is clicked
$(".level1").click(function(event){
$(this).find(".level2").slideToggle(500);
}); // if level1 is clicked, dropdown level2
}
}, 100); // check every 100ms