henrymarshall / deep-search Goto Github PK
View Code? Open in Web Editor NEWChrome Extension to perform deep search on page's links
Chrome Extension to perform deep search on page's links
By convention action types are specified as constants in Redux. This causes them to throw errors in the event of a typo rather than failing silently.
I don't think chrome.tabs.sendMessage
would throw if message is undefined, but adding a
case undefined: throw new Error("Undefined request.message, possible typo")
to the various messageListener.js
or messageContent.js
would be simple in any case.
Depending on the page and your search, clearMarks
can involve hundreds or thousands of DOM changes. Performance improvements may be achievable by using jQuery's clone
, modifying that, and replacing the page's contents.
If this results in marked improvements consider a similar procedure in content/shallow/search.js
.
As of now, after a successful deep-search, results are presented in a simple alert. It would be nicer if the match results were presented in an html table. This would permit copying to the clipboard. It would also look a good sight better!
After discussion at LIJS, it was decided that a tooltip would be a better form factor than a modal as it is easier to dismiss (move mouse away) and will never directly cover the link itself in the likely event you do want to visit it.
There are lots of tooltip libraries out there and something may fit our bill. However we do have some peculiar concerns:
Pages that were in the process of being downloaded when the clear command was issued appear with their appropriate marks.
No marks should be on the page
When performing a deep search the $.ajax requests are leaking a small amount on memory. Because this is a long running extension, this can eventually add up if the user does not close their browser with any frequency.
Experiments using the Google Closure library's XHR pool appear promising.
It looks like this extension has disappeared from the Chrome Web Store. Additionally, the extension settings show a warning:
โ ๏ธ This extension violates the Chrome Web Store policy.
No more information is provided. I'm wondering whether this is an easily fixable situation, or whether it requires changes to the extension itself?
I can still use the extension for now, but updating or installing it to another computer might get tricky.
I'm using Chrome 112.0.5615.137 on MacOS 13.3.1, and Deep search v0.1.2
Hey Henry,
Thanks for making this extension! ๐ I know you're probably not thinking of updating it much these days but I wanted to make one small request?
I use this exclusively for Regex searches, and it's a pain that the state of that button isn't preserved between tabs/sessions. I got tired of clicking it and made it default to "on" by hand-editing popup.js
(was a bit tedious to find since the code was minified but I did find that changing isRegex:!1
to isRegex:!0
did the trick).
Is it possible to change the below to default to isRegex: true,
?
Even better would be an "options" page that allowed the user to choose their preferred defaults. I realize that's a bit more work. Either way, thanks for reading!
As currently implemented an unperformant regex may crash the extension. If the execution of the regex were instead farmed out to a web worker, it could be terminated on a timeout.
Hi,
I wanted to use the extension to search and extract info from XML files that I have available online for browser access. But the highlighting is not working and for me even worse the download as CSV does not work.
For the download as CSV I see the below error in Chrome console:
Error in event handler: TypeError: n.click is not a function
at n (chrome-extension://jlkomfekppedfijpagfiapmghpoaegpc/scripts/contentscript.js:34:255)
at Object.o [as downloadCsv] (chrome-extension://jlkomfekppedfijpagfiapmghpoaegpc/scripts/contentscript.js:43:8368)
at chrome-extension://jlkomfekppedfijpagfiapmghpoaegpc/scripts/contentscript.js:26:7917
I am using Chrome Version 92.0.4515.107 (at the moment) on Windows 10 and installed the deep-search extension today (0.1.2).
One example of a XML content would be:
service-configuration>
<!-- time interval (seconds) between fetching data from the server - for all viewers -->
<refresh-interval-secs>60</refresh-interval-secs>
<auto-scroll-delay-secs>90</auto-scroll-delay-secs>
<product-services>
<!-- #### Viewers #### -->
<service name="Products">
<service name="OPE">
<service name="MRT">
...
Would be great if you could have a look at what could be the problem. If you need any further info from me, let me know.
Best regards,
Manfred
Observed: Search box has "bar", but "foo" elements are still highlighted. Clicking "find" or "find prev" cycles through instances of "foo".
Expected: Search box retains query on a per tab basis. Returning to tab 1 causes the text to revert to "foo". Options "case insensitive", "use regex" should also be separately maintained.
Per tab state seems like it would be a common problem, investigate whether there is a Right Way.
State is currently stored on a background page as a single global. It could be stored as an object with tab IDs for keys. This strategy would prevent automatic garbage collection if relevant key:value pairs are not deleted when tabs are closed. This seems like an easy thing to get wrong (crashed tabs, closed windows etc), but is the right place to maintain store.
A somewhat jankier solution is to store the state as a global on the page in question. GC would happen automatically when the tab disappears. A side benefit of divorcing state management from the background is that the remaining processes (cross origin downloading of linked pages and search matching) could be made into event pages with resultant performance gains.
A substring of the string that was selected after step 2 should now be selected. This is how the baked-in chrome search functions
The first match for the new string will be matched. This will scroll your viewport to see it.
Currently the deepSearch-current-highlight
class is assigned as part of the call to findAndReplaceDomElements
. Because resolving #5 makes it impossible to know what will be in the viewport during this replacement, identification of the current highlight must be deferred.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.