topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 6:23 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: (ON HOLD) Idea: "FAIPS" - Find All In Page Search  (Read 4842 times)

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
(ON HOLD) Idea: "FAIPS" - Find All In Page Search
« on: October 12, 2019, 12:28 PM »
Hi,

First off, I'm not even sure this utility request would be qualified as a "Coding Snack," but hey, what do I know? So, here's hoping! :)

There are numerous "Find In Page Search" (FIPS) utilities available. My need is for a FIPS which will find all character strings, but instead of searching for a single string the "Find All In Page Search" (FAIPS) would need to find all items from a list on the page. Here are some specifics...
  • The purpose is for research. Essentially, the researcher would populate an "Always On Top," floating and resize-able "word list" box to take to candidate websites and execute the search which would locate any/all hits.
  • A "No Hits On Page" pop-up message box if no words from the list are found.
  • The word list would need to have at least 100 user-entered words to search, but for the prototype we can use 10 words to test the function. The candidate resources are very long.
  • All hits would need to have persistent background highlights.
  • Highlight color would be user-configurable. Different websites use different colors.
  • "Select All" button to highlight all hits for all words in the word list.
  • If a word in the list were selected each hit for that word would be the only hit(s) highlighted.
  • "Find First" button to locate the first hit on the website.
  • "Find Next" button to locate the next hit.

The effect would be like doing a word search once instead of a 100 different "Find In Page" word searches. I have no idea how feasible it would be to make this work and I would understand why no one would want to tackle it, but I thought I would ask anyway.

I will be trying to make this work myself, but the outcome is dubious. I used to be a fair programmer, but nowadays, eh not so much. I have looked into AHK and have submitted a request for help, but there are some pretty sharp folks on DC too!

I am thinking the first thing I need to do is to make a working copy of the webpage itself. It is the only way I can think of to write additional HTML which I believe the highlighting would need. I also suspect there would have to be a recursive function for each word searched from the list which seems like each successive search would have to re-write the HTML before going to the next word in the list. If there is an easier way I am not aware of it. Anyway, any assistance would be appreciated.

Please let me know if I can be of any help clarifying, etc.
« Last Edit: October 12, 2019, 04:57 PM by CodeTRUCKER »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Idea: "FAIPS" - Find All In Page Search
« Reply #1 on: October 12, 2019, 01:33 PM »
A quick search suggests there are various Chrome and Firefox extensions for multi word search and highlight functionality. It could help any coders who might have a go at this if you describe which such extensions you have already tried and what you find lacking in them.

Is your goal a standalone tool for offline searching in previously downloaded .html file copies of websites? Or a browser extension?

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Idea: "FAIPS" - Find All In Page Search
« Reply #2 on: October 12, 2019, 01:42 PM »
Thanks for the reply. I guess you are a better searcher than I am. My searches came up with nothing. I did continue to flop about like a fish out of water and stumbled upon something like a Greasemonkey script (which I don't understand how to make work). I found the script at https://userscripts-.../scripts/show/292083.

I think this might suffice if I could make it work, but alas, no joy so far.

It would be nice if the FAIPS could work with any text, pdf, doc, etc., but I would be happy to make it work on just a website for now. I'm guessing making it work on a website would be easier?

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Idea: "FAIPS" - Find All In Page Search
« Reply #3 on: October 12, 2019, 01:59 PM »
Also, we don't have to reinvent the wheel. If anyone knows of something which can do something near what I am looking for to search web pages, I am open to suggestions.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Idea: "FAIPS" - Find All In Page Search
« Reply #4 on: October 12, 2019, 04:56 PM »
Okay, I have no idea why, but I installed Chrome and the "MultiHighlighter" extension a 2nd time and this time it worked. It did not work the first time I tried. I'm still not keen on using Chrome (Google), but it does work and the MultiHighlighter extension didn't die when I entered my eighty-plus count word list. It's usable for my needs so I can put this request ON HOLD for now. Thanks for your efforts.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: (ON HOLD) Idea: "FAIPS" - Find All In Page Search
« Reply #5 on: October 12, 2019, 05:36 PM »
https://greasyfork.o...t-highlight-and-seek

The script above is what your looking for. The script you posted about is an outdated script hosted only as a reference for future coders. I actually asked for this script to be made and Jeff was kind enough to do it.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: (ON HOLD) Idea: "FAIPS" - Find All In Page Search
« Reply #6 on: October 12, 2019, 05:37 PM »
I'm still not keen on using Chrome (Google)
AFAIK there's various Chromium based alternative that don't have the Google connection where the extension would probably work. I was going to recommend SRWare Ironw which I used use, but after reading the criticism there... maybe look for another one.
Tom

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: (ON HOLD) Idea: "FAIPS" - Find All In Page Search
« Reply #7 on: October 12, 2019, 08:50 PM »
Thanks for the tips.