Changes
Jump to navigation
Jump to search
2,401 bytes removed
, 09:18, 20 July 2021
Line 19: |
Line 19: |
| } | | } |
| | | |
− | var timer = setInterval(function() {
| + | mw.util.addPortletLink ('p-nawigation', '/wiki/how_to_Do', 'How To Do'); |
− | 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-minerva-watchlist"> \
| |
− | <span>Menu</span> \
| |
− | </a> \
| |
− | </li> \
| |
− | <ul class ="level2"> \
| |
− | <li> \
| |
− | <a href="http://wiki2.larnitech.com/index.php/How_to_do" \
| |
− | class="mw-ui-icon mw-ui-icon-before"> \
| |
− | <span>{{mediawiki:howtodotr}}</span> \
| |
− | </a> \
| |
− | </li> \
| |
− | <li> \
| |
− | <a href="http://wiki2.larnitech.com/index.php/Din-rail" \
| |
− | class="mw-ui-icon mw-ui-icon-before"> \
| |
− | <span>Din rail devices</span> \
| |
− | </a> \
| |
− | </li> \
| |
− | <li> \
| |
− | <a href="http://wiki2.larnitech.com/index.php/box" \
| |
− | class="mw-ui-icon mw-ui-icon-before"> \
| |
− | <span>Box devices</span> \
| |
− | </a> \
| |
− | </li> \
| |
− | <li> \
| |
− | <a href="http://wiki2.larnitech.com/index.php/app" \
| |
− | class="mw-ui-icon mw-ui-icon-before"> \
| |
− | <span>Application</span> \
| |
− | </a> \
| |
− | </li> \
| |
− | <li> \
| |
− | <a href="http://wiki2.larnitech.com/index.php/xml" \
| |
− | class="mw-ui-icon mw-ui-icon-before"> \
| |
− | <span>Xml</span> \
| |
− | </a> \
| |
− | </li> \
| |
− | </ul> \
| |
− | </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
| |