Ben 10 Fan Fiction Wiki
Register
Advertisement
Ben 10 Fan Fiction Wiki
Tutorials
AdvancedOasisUI - BackToTopButton - MarkForDeletion - RelatedDiscussionsModule - RevealAnonIP - SearchButtonV2 - VisualSpellCheck - Wikimarks


BackToTopButton is a helpful script to have on long pages.

Installation[]

To install MarkForDeletion, simply add:

importArticles({
    type: "script",
    articles: [
        "u:dev:BackToTopButton/code.js"
    ]
});

to your global.js on Community Central to affect all wikis or your wikia.js on this wiki to affect only this wiki. You can only have one importArticles call in each console page, so add just:

        "u:dev:ScriptName/code.js"

if you already have one. Note that if you haven't yet used any script articles you will also need to copy the "type:script articles[]" section.

Customization[]

You can change the speed of how fast the scroll-up back to the top is by changing the variable "speed"

 var speed = X;

Higher numbers make the scroll-up faster; default is 600.

You can also change how far down on a page the button appears by changing the variable "start"

 var start = X;

Higher numbers make the button appear farther down on the page; default is 800.

You can change the appearance of the button by modifying some CSS

 /* Back-to-top Button Format */
#backtotop button{
    background: none;
    background-color: transparent;
    color: white;
    border: none;
}
#backtotop button:hover {
    text-decoration: underline;
}

This example turns the button into a normal link.

The final customization that can be made determines if the button fades in and out or simply appears when you reach the point on the page when the button is set to appear. You can do this by changing the "ToggleFading" variable to 0.

 var ToggleFading = 0;

Usage[]

BackToTopButton adds a button into the button toolbar that links back to the top of the page.

Clear Cache[]

Before this script can begin working, you must clear your cache by doing the following based on your browser.

  • Internet Explorer, Firefox, Chrome: Press Ctrl+F5.
  • Opera: Go to Tools→Preferences.
  • Konqueror and Safari: Click Reload.


This tutorial was created by Paperluigi ttyd.

Advertisement