MediaWiki:Common.js

From Geeetech 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: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/usr/lib/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering this message, please comment in https://github.com/pypa/setuptools/issues/1458 about the steps that led to this unsupported combination. ************************************************************ sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
if(document.getElementById("toc")){
  var toc_height = document.getElementById("toc").offsetHeight;
  var toc_to_top = document.getElementById("bodyContent").offsetTop;
  var toc_scroll_top = toc_height + toc_to_top + 20;
  window.onscroll = function() {
    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
    if(scrollTop > toc_scroll_top){
      document.getElementById('toc').style.position = 'fixed';
    } else {
      document.getElementById('toc').style.position = '';
    }
  }
}