MediaWiki:Mobile.js

From OpenStreetMap Wiki
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences
/* Any JavaScript here will be loaded for users using the mobile site */

// adds expansion link for language bars
addOnloadHook(function() {
    $('#ExpandLanguages a:first-child').click(function(event) {
        event.preventDefault();
        $('#Languages').toggleClass('showOther');
        // The text of the link might need to change as well
    });
});

// code from joto to produce taglist tables, doing calls to get data from taginfo
// Used for creating lists of tags from taginfo.
// See https://wiki.openstreetmap.org/wiki/Taginfo/Taglists
jQuery.getScript( "https://taginfo.openstreetmap.org/js/taglists.js", function() {
  addOnloadHook(function() {
    taginfo_taglist.convert_to_taglist('.taglist');
  });
});