Advancedsearch Greasemonkey Userscript for Digikey Website

NOTICE Due to changes in website infrastructure, this script no longer works on Digi-Key’s website. This page is now considered historical and there is not a planned future for the userscript. There is an exploratory userscript called Keymaster that works with the new infrastructure, but it is not entirely stable.

Please Give Feedback! Want to see any of these features implemented on the Digi-Key’s website, or would like to request new ? Multiple people read every single comment submitted and the feedback is used to help set the roadmap for the future.
Give Feedback Here

Introduction

The advancedsearch script is intended to enhance user experience while browsing www.digikey.com and associated international websites.

Highlights include:

  • Voltage Range Parsing
  • Remember In Stock Checkbox Preference
  • One-Click Part Number Copy
  • Column Math
  • Parametric Scatter Charts
  • Picture Oriented Browsing Additions
  • Break-Even Price Point Calculations for Price Breaks
  • Keyword Highlighting
  • Sticky Search Header
  • Search 3d Models

This script is a hobby and as such may have some bugs or flaws, but it is intended to be a testbed for trying things that could be helpful for people searching for parts. Many functions are modular and can individually be disabled or enabled based on user preferences. Inspiration for this userscript came from the now retired Digi-Key Sort By Price that added the then lacking title function to Digi-Key’s website. Updates have been ongoing throughout 2019.

Requirements

This script is updated and tested on the most current official releases of Firefox/Chrome and Tampermonkey. Nearly any other browser with Tampermonkey support can run this script as well including Edge, Vivaldi, Opera, etc…

This script is not designed with small screens in mind. A 900p or larger screen is recommended for the best experience.

Installation

For Firefox, Chrome, Edge or Opera using Tampermonkey (Greasemonkey is no longer supported due to changes in FF57+ and GM4+)

  1. Install the Tampermonkey Extension. (chrome) (firefox)
  2. Then click to install the script.

If you’d like to see the source code, head on over to the GitHub repo
Updates
Tampermonkey automatically checks for script updates and download them as necessary.

Feature Overview

  • Choice to default all searches to a desired quantity sorted by price (must be enabled in options)
  • Style changes, rounded corners, alternating row shading
  • Ability to click on filter options without using ctrl+click (no more slipping off of the ctrl key)(must be enabled in options)
  • Eliminates wasted space, extra search boxes, line breaks, combines some table columns (must be enabled in options)
  • Hide table columns by double-clicking
  • Instant results on Index page if search term matches family name.
  • Feature management area to turn many options on and off

Range Text Input

  • Parameter specific search helpers. ie use text to find a voltage included in a range
  • This takes care of plenty of headaches when searching for LDOs

One Click PN copy

image

Visual highlighting of search terms

image

Column Math

  • Find things like
    • Lumens/W per dollar for LEDs
    • Find Watts/dollar for power supplies
    • Figure of Merit for MOSFETs
  • Perform math on calculated columns


Preview Images for Families

  • Example preview images by hovering over any link to a product family

Browse using pictures on the filter pages

Break-Even Price Point Calculations for Price Breaks

image

Price Breaks on Filter Page

  • Hover over a price to see all price breaks

Extra Info for Associated Products

  • Hovering over associated products on the part detail page gives more information about each part

Datasheet Preview

Breadcrumb Families

  • Hover over Category breadcrumb to see all Families in the category

Quick select your favorite filters

Checkbox filters

  • Easier selection of things like peripherals, connectivity and other comma separated values
  • Instead of hunting through lists like below, you get checkboxes on the below:

image

Digi-Key Night Mode

  • Experimental

Preference Settings

Some features have found their way into the official Digi-Key site

  • Live Results Count
  • Hover over images
    Pricing, Availability and Datasheets have been moved to the left side of the results table
  • More than 25 parts per page can now be loaded
  • The minimum order quantity is now pre-filled in add to order quantity box
  • In-line cart editing, pictures in cart
  • Column sort highlighting
  • Floating table headers that follow when scrolling
  • Last breadcrumb is now a link to see all parts in family
  • Remove Previous Filter Selections (deapply filters)
  • Search Within Results
  • Index on side of results page
  • Preview of cart in header
  • Floating Apply Filters Button
  • Clear Individual Filters
  • Images for Associated Product
  • Easy Part Number Copy
  • Hover Cart with Images (not including the in-hover qty editing)

Update Log

//1.7.3     gave the detail page a softer look, changed the text voltage input helper to be more user friendly
//1.7.6     Download link changed to bit.ly to keep track of downloads. https://dl.dropbox.com/u/26263360/advancedsearch.user.js
//1.7.7     Userscripts.org release http://userscripts.org/scripts/show/157205
//1.7.8     Added more alternate highlighting terms.  ie search for "10k" and all the resistors and pots will be highlighted,
//          started checkboxes feature, changed the "initially sort by price" feature to re-filter on desired quantity when changed
//1.7.9     Added indexInstantFilter function.  Instantly filter down product families as user types in search box. Disabled by default.
//1.8.0     Added Cart Hover and item count in header. 
//1.8.1     Fixed sort by price @ Qty bug. Improved cart hover. Added price break popup when hovering over prices.
//1.8.2     Added simple column hiding. Refactored code, bug fixes.
//1.8.2.1   Added some error catching code
//1.8.3     Added Hover function to Associated Products Links, For Use With Links, and added a browse and filter function to both spots on the Product detail page.
//1.8.3.1   Fixed Chrome problems by using runat document-end instead of document-start.
//          Fixed breadcrumbs to include sort order/in stock/lead free/rohs and quantity modifiers
//1.8.4     Added Breadcrumb Category Hover. Made Jump to Category scrollable. Fixed some bugs introduced by styling changes made by DK.
//1.8.5     Added Associated Product Carousel on product detail pages.  Fixed the chrome auto scrolling bug.  Added jquery plugins as "at require".
//          Added Compare Feature
//1.8.6     Added Reverse Filtering from product Detail pages
//1.8.6.1   Added feedback to the reverse filtering and compare features and exposed a more intuitive interface
//1.8.6.2   Fixed issue where multiple product families messed with the Carousel.
//1.8.7     Started bringing in CSS externally, Added wrapping feature for Parameter Multiselect Boxes, Added accordion select box tech demo
//          Added show hidden columns button
//1.8.7.1   New version of compare, pops up from bottom, no more hoverover.
//1.8.7.2   Fixed annoying headers not lining up,
//1.8.8     Added icons in jump to area
//1.8.8.1   Turned Icons into sprites.  Fixed bugs with carousel. Rearranged some of the Controls menu
//1.8.9     Revamped the cart quantity changing.  Added the main cart page to the script added functionality.
//1.8.9.1   Added pictures to the cart areas.
//1.9.0     Added Explore Mode - gives little popups with pictures of each parameter when hovered
//1.9.0.1   Tweaked Explore Mode - gave a medium preview box in the Explore Mode hover
//2.0.0     Fixed bugs introduced by updates to digikey's site
//2.0.0.1   Fixed more bugs introduced by updates to digikey's site
//2.0.1     Added horizontal scrolling feature to Apply Filters, Added feature allow checkbox inputs to comma separated values in a multiselect input.
//2.0.2     Added Search Within: feature on Drill Down Results Page. Bug Fixes
//2.0.2.1   Hid some lengthy text to improve density
//2.0.3     First Attempt at Internationalizing the script.  In theory it should work on all English digikey websites from now on.
//2.0.3.1   Fixed Sorting bugs
//2.0.4     Fixed the bloated sequential timing to get script loadtime down to 10%, Introduced applied filters removal
//2.0.4.1   Fixed cart bug, added some more speed optimizations.
//2.0.4.2   Tuned some of the hover over timings.
//2.0.4.3   Fixed No records matching bug.
//2.0.5     Added index column feature, fixed category highlighting with Jump To Category feature
//2.0.5.1   Refined some of the index page features, including column
//2.0.5.2   Added a control for location of quick pick box
//2.0.5.3   Some quick fixes
//2.0.5.4   Refinement of quick pick controls, fixed bug with forward slash in breadcrumb
//2.0.6     Finished wrapping the filters to avoid side scrolling.
//2.0.6.1   Added some more parameter titles to work with the voltage helper, added button to switch on explore mode
//2.0.6.2   Fixed the voltage helper used with wrapping, fixed clear buttons, added control for wrapping divs
//2.0.6.3   Style changes, gray headers
//2.0.7     Polished. Changed style of the filters, input text boxes, fixed buttons, changed the floating apply buttons
//          fixed applyfilters bug, put buttons in tabs
//2.0.7.1   fixed a few display bugs in Chrome
//2.0.7.2   fixed formatFilterResults page error
//2.0.8     added datasheet autoloader
//2.0.8.1   fixed some errors introduced by changes on digikey's website
//2.0.8.2   minor cleanup, error alerts, and fixes
//2.0.8.5   weekend refactoring
//2.0.9     fixed compare parts feature
//2.0.10    fixed error occurring on the detail page where user could not delete parts, added always expand checkbox to wrapping filters
//2.1.0     added customizable delay time for Explore mode in the control panel
//2.1.1     added jump down to datasheet button
//2.1.2     fixed errors where filters cannot be removed
//2.1.3     added back caching for the removable filters
//2.1.4     hopefully fixed errors associated with foreign languages
//2.2       Added query term highlighting on the filter results page, fixed formatting errors introduced by new defualt font.
//          Changed color of help icon, changes also in CSS
//2.2.1     added null string check to fix bug with query term highlighting
//2.2.2     made the header respond better to different size windows
//2.2.3     added partial .jp support for range search
//2.3       reworked the voltage range search algorithm to include comma separated values
//2.4       Added search button highlighting, fixed so all floating filters appear in-line, added next price break calculator.
//          Fixed errors due to Digi-Key website changes
//2.4.1     Fixed doubling up bug in the quick picks box, fixed stacked explore mode box in chrome
//2.5       Added ORing checkboxes to the package type inputs
//2.5.1     Fixed bug on fastadd page, added quickpaste function on fastadd page
//2.5.2     Code cleanup, added BSD license
//2.6       Quick Fix for Quick Picks update on dk site
//2.6.1     Fix for digikey site bug.
//2.6.2     Added My Digi-Key link
//2.6.3     My Digi-Key link international bug fix
//2.6.4     Fix for Explore mode and example pictures on some sites
//2.7       Fixed issues introduced by cart changes, code cleanup
//2.7.1     Code cleanup, added id
//2.7.2     quick fix
//2.7.3     fixed the uniqueness of the checkbox helper
//2.7.4     fix for new header on dk website.
//2.7.5     fixed bug in the Search Within feature
//2.8       added a more functional associated parts filtering mechanism,
//          added Hide Identical Columns feature, tweaked instant filter with wildcard search
//2.9       added Column Math and picture carousel
//2.9.1     added graphing/charting, fixed picture carousel, refining value parser
//2.9.2     refactored associated product, fixed header link bugs, removed beablock blue, various other bug fixes
//2.9.3     hid customers who evaluated box
//2.9.4     added fonts, restyled checkboxes, filter page bug fixes
//2.9.5     fixed bugs in similar to feature, fixed button highlighting problems, style changes
//2.9.6     added clear button rules, worked on speed, sending ot to fix dropbox serving error
//2.9.6.1   chrome fix for selectbox width
//2.9.6.3   fixed bugs in wrap filters area
//2.9.7     handled change in breadcrumbs, styled index page
//2.9.8     Started wizards, added LEDwiz, changed qty form, fixed double fill bug in associated product, moved detail image.
//3.0       Large refactor, fixed price break hover
//3.0.1     Fixed Temperature Range helper
//3.0.2     Fixed European price formatting error, added some icons
//3.1       Started reformatting the Index page
//3.1.1     Fixed indexpicpreview
//3.2       Added Visual Picker, finished header redesign, fixed search focus, added link to category.
//3.3       Added images to families, removed explore mode, improved pick with pictures feature.
//3.4       No longer runs in cart, fixed CSS issues, removed some unused javascript libs
//3.4.1     Fixed index image problems going to the wrong url.
//3.5       refactored for speed improvements. index pictures, header, control widget.
//3.5.1     fixed checkbox bug
//3.5.2     delayed the init of settings box for speed, fixed table width issues.
//3.6       fixed upper case issues with instant search, fixed compare z-level, replaced * and - text with name and title text
//          added learn more about capacitors link, fixed matching-records bug, added "new products" link
//3.6.1     added image hover over supplier portal links, fixed the associated product view all links.
//3.6.2     added https in product search, added view more button at bottom of product table
//3.6.3     added search help
//4.0       Major overhaul needed because of digikey website update
//4.0.2     Added image bar back.
//4.0.3     Retooled voltage range helper. Clippy!!!
//4.0.4     added [at]connect declarations for tampermonkey 4.0, fixed sideindex background issue,
//4.0.5     added dark theme/night mode, added auto search to results not found page, bug fixes
//4.0.6     added back associated product, fixed night mode for chrome
//4.0.7     actually fixed chrome night mode
//4.1       fixed associated product bugs, updated font awesome, made the switch from getResourceText to getResourceURL for css, addtocart on filterpage
//4.1       added show/hide TR, DKR button and function in options
//4.1.1     started fixing detail page bugs introduced by changes on the website
//4.2       fixed datasheet loader, added copy to clipboard on detail page, updated tooltipster
//4.2.1     fixed bug in addMorePartsToTable
//4.2.2     fixed part status bug
//4.2.3     fixed url bug
//4.2.4     fixed normally stocking box
//4.2.5     augmented compare parts, copy content, visual picker fixes , attform fix
//4.2.6     added quickfilter, fixed bugs with product-search url changes
//4.2.7     added Direct Manufacturer URL, fixed datasheets for https website, added detail page part compare.
//4.2.8     fixed datasheet autoloader bug
//4.2.9     added copy button to filter results table page, big speed optimizations, compare parts page features
//4.3.0     added normally stocking feature to header, added image to related product, fixed floating apply, range height fixed
//4.3.0.1   actually fixed floating apply
//4.3.1     added canonical link on detail page, moved mfg links on associations, dead code cull, switched resources to github links
//4.3.1.1   changed pure resource to github
//4.3.1.2   changed downloadURL to rawgit
//4.3.1.3   changed downloadURL and updateURL to hest.pro short url
//4.3.1.4   fixed checkboxes, limited canonical url, fixed sprites, remaining dropbox links
//4.3.1.5   fixed logo link
//4.3.2     Pushed warning message for FF57 update
//4.3.2.1   removed no search results found page from scope
//4.3.2.2   updated family images
//4.3.2.3   fixed jump to image on filterresultspage
//4.3.2.4   fixed clippy, all https
//4.3.2.5   put in clippy date detection
//4.3.2.6   fixed col math and chart errors
//4.3.2.7   fixed price break helper, fixed carthover bug
//4.3.2.8   fixed associated product hover, hacked cart count
Screenshots from past versions












Ah, you’ve ‘React-ified’ the site; that might explain some changes in behaviour I’ve noticed recently (recently = the past 12 months; i’ve been away a while :wink: ).

I got here because I appeared to need to re-install the Advanced Search script, I can’t remember why that would be, I don’t remember uninstalling it, it used to be present, but whatever.

Reason I got here, was I wanted the ‘package thumbnails array/list display’ that used to sit near the bottom of the Parametric selections box. Then discovered that Advanced Search is defunct :frowning:

It’s true, a lot of its features have been folded into the site proper, which is wonderful. Despite DK being among, if not the, best parametric components search function, AdvancesSearch demonstrated so much more potential/need.

Are the ongoing site dev plans to add more of Advanced Search’s features? Or were they deemed too niche?

3 Likes

There are plans to try to accommodate more features, but the exact implementation in the userscript is probably not the best or most user friendly way for many of the features. Feedback or feature requests are definitely welcome, and if you’d ever want to talk over needs or desires in live conversation I’d happily set that up.