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 7555849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:43:08+00:00 2026-05-30T11:43:08+00:00

I need a list/collection/array/whatever of all links on a website. Currently I’m using window.content.document.links,

  • 0

I need a list/collection/array/whatever of all links on a website.
Currently I’m using window.content.document.links, but that doesn’t work an all websites. (Those websites produce an empty array.) (Example: dctp.ws) I’m guessing that’s because those sites contain frames. Is there any way to access the links inside the frames?

Also, this is a FireGestures script, so it’ll run “inside the browser”. I don’t want to download the website or something like that, since the browser already downloaded and parsed it.

  • 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-30T11:43:10+00:00Added an answer on May 30, 2026 at 11:43 am

    You can get a NodeList of all a elements from a document using getElementsByTagName, like this:

    var list = document.getElementsByTagName("a");
    

    So you’d do that for the main document, and for all frames in the document. To access the frames, you can use the window.frames pseudo-array. Each entry is the window object of that frame, so:

    var listInFrame = window.frames[n].document.getElementsByTagName("a");
    

    So create a blank array, add in the elements from the document itself, then loop through the windows adding the links from their documents.

    I’m not familiar with FireGestures, so I don’t know if the Same Origin Policy applies to the scripts it runs.


    Update: From your comment below, it sounds like FireGesture scripts are subject to the SOP. So you won’t be able to directly access the content of documents from different origins in a FireGestures script.

    You might be able to do something combining FireGestures and GreaseMonkey. GreaseMonkey has an API call, GM_xmlhttpRequest, that bypasses the SOP — but note that it would be another GET, you wouldn’t be reading the copy of the page that’s already in-memory, which you said you wanted to do. Unfortunately, it’s entirely possible that you may not be able to do what you want with FireGestures. You may have to write your own add-on entirely (and have it request relevant permissions).

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

Sidebar

Related Questions

I need to list all files whose names start with 'SomeLongString'. But the case
I'm building a website in ASP.Net, using MVC, and need to list a set
I have the need to store a list/collection/array of dynamically created objects of a
I've got a collection (List<Rectangle>) which I need to sort left-right. That part's easy.
I have the following List<int> collection and I need to find the highest integer
In my application, _collection is a List from which I need to remove all
I have a List<InputField> but I need a List<IDataField> Is there a way to
Velocity DisplayTool has a useful method: $display.list($list) That will format a collection or array
I need to store a recursive tree structure. A linked list. So all the
I need to convert the following collection into double[,]: var ret = new List<double[]>();

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.