Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1004731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:10:46+00:00 2026-05-16T08:10:46+00:00

recently I’ve installed the FireGestures plugin for Firefox, which I find very useful. You

  • 0

recently I’ve installed the FireGestures plugin for Firefox, which I find very useful.
You can also create your own scripts using JavaScript.

I want to create a script that simply scrolls to the top and then reloads the page.
Sound simple, but I couldnt figure it out.

In FireGestures’ help page it says “Of course, you can use global objects defined in browser.xul such as gBrowser, Cc and Ci.”

I dont have eny experience with those and the Mozilla XUL documentation is one of the worst things that I’ve ever seen.

I’ve managed to trigger the reloading part by intuitively typing gBrowser.reload(); which reloads the current tab (exactly what i want).

How can I tell FireGestures to scroll to the top?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:10:47+00:00Added an answer on May 16, 2026 at 8:10 am

    This worked for me.

    goDoCommand('cmd_scrollTop');
    gBrowser.reload();
    

    This link has some more cmd_* commands with explanations (Just have to find the command among the Keyconfig syntax). http://kb.mozillazine.org/Keyconfig_extension:_Firefox

    Also, viewing the source of some of the other Mappings will give you these cmd_* commands as well.

    EDIT:

    Here is a list of some of the more basic commands I found on the URL above (I haven’t tested all of these):

    • Open Location: gBrowser.loadURI('http://www.mozilla.org/');
    • Next Tab: gBrowser.mTabContainer.advanceSelectedTab(1);
    • Previous Tab: gBrowser.mTabContainer.advanceSelectedTab(-1);
    • Reload All Tabs: gBrowser.reloadAllTabs();
    • Close current Tab: var tab = gBrowser.mCurrentTab; gBrowser.removeTab(tab);
    • Scroll Page Down: goDoCommand('cmd_scrollPageDown');
    • Scroll Page Up: goDoCommand('cmd_scrollPageUp');
    • Scroll to the Bottom: goDoCommand('cmd_scrollBottom');
    • Scroll to the Top: goDoCommand('cmd_scrollTop');
    • Scroll Line Down: goDoCommand('cmd_scrollLineDown');
    • Scroll Line Up: goDoCommand('cmd_scrollLineUp');

    EDIT:

    Here is a more comprehensive list of commands (Also untested):
    https://developer.mozilla.org/en/XUL/List_of_commands

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I was asked to develop an app, which basically is going to use
Recently I was able to create a tablet software for my Cerebral Palsy girl
Recently, I was writing a class in which I discovered that I could reduce
Recently launched a Magento store which features an image slider on the homepage. Works
Recently just upgraded to SQL Server 2008 R2 Express. When I attempt to create
Recently I made a terrible mistake, I installed delphi 6 in my laptop, and
recently I installed Nodejs on Windows 7 and it was working perfectly. Few days
recently, I research for the collection framework, and find LinkedSet( AS3Commons collection framework ,it
Recently i found the raphael's library which is amazing. For example this: Raphael Chart
Recently I've been very interested with GWT and Google App Engine. Although I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.