User:BrandonXLF/FloatHead

From Wikipedia, the free encyclopedia

Float Head makes the head (top menu) float and remain at the top as you scroll down.

< BrandonXLF's scripts |
DescriptionMakes the head float
Float Head makes the head (top menu) float and remain at the top as you scroll down.
StatusWorking
First releasedJanuary 9, 2018
Quick facts Description, Author ...
Float Head
DescriptionMakes the head float
Float Head makes the head (top menu) float and remain at the top as you scroll down.
AuthorUser:BrandonXLF
StatusWorking
First releasedJanuary 9, 2018
SourceFloatHead.js (git)
FloatHead.css (git)
GitHub repositorywikipedia-user-scripts
Close

Installation

You can install this script using JavaScript (JS) or Cascading Style Sheets (CSS). CSS will allow the script to run right at load whereas JS may have a delay before applying, this means the scripts style won't work instantly using JS but will using CSS.

Using JS

importStylesheet('User:BrandonXLF/FloatHead.css'); // {{#parsoid
  • Alternatively, use the following instead of the above:
mw.loader.load('/w/index.php?title=User:BrandonXLF/FloatHead.css&action=raw&ctype=text/css', 'text/css'); // {{#parsoid
  • To install on other wikis (for instance, globally in your global.js on the Meta-Wiki), use the following code:
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/FloatHead.css&action=raw&ctype=text/css', 'text/css');
  • After installing reload the page and clear your cach

Using CSS

@import url(https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/FloatHead.css&action=raw&ctype=text/css); /* {{#parsoid
  • After installing reload the page and clear your cace

Comments are welcome on my talk page, be sure to indicate that you're talking about this script in the title. I would really like any suggestion to make the script run better.

Comments/Bugs

Related Articles

Wikiwand AI