As an anonymous user, you can only add new data. If you would like to also modify existing data, please create an account and indicate your languages on your user page.

MediaWiki:Common.js

From OmegaWiki
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 all users on every page load. */
 
/* Opens the definition if there is only one */
$(document).ready( function() {
  if ( $('div.level3').length == 1 ) {
    $('.collapse-exact-record').hide();
    $('.expand-exact-record').show(100).delay(100).show(100) ;
  }
});
 
/* display of Wikipedia links and images on the side */
importScript( 'MediaWiki:Common.js/SideIcons.js' );
 
 
function userIsInGroup( group ) {
        // are they in a given local group?
        if ( wgUserGroups ) {
                if ( !group || group.length == 0 ) {
                        group = '*';
                }
                for(var i in wgUserGroups)
                        if (wgUserGroups[i]==group) return true;
        }
        return false;
}
if ( userIsInGroup( 'sysop' ) ) {
  importScript ('User:Kipcool/common.js/deleteall.js');
}