npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

selectivizr2

v1.0.9

Published

Selectivizr maintained.

Downloads

60

Readme

What happened to the old project?

Keith Clark was eaten alive by sabre-tooth rattlesnakes or something. Who knows?

Good on him for originally inventing this though. :beers:

Why support old IE?

Why completely turn your back on it? I'm not saying give it special attention (unless you're making a website for the most populated country in the world), but why not toss some polyfills in conditional comments and at least give the poor bastards who are stuck on IE6-IE8 something to look at.

It requires almost 0 effort on your part and can make your website viewable to a lot of people.

What is Selectivizr?

Selectivizr is a polyfill that makes IE6-8 work with most CSS3 selectors (like :nth-child).

Installation

  • bower install --save selectivizr2

Usage

To use the library, you'll need to include the latest jQuery 1.x.x.

Then add the following conditional comment after your stylesheets and jQuery:

<!--[if lt IE 9]>
  <script src="selectivizr2.js"></script>
<![endif]-->

Example

<!doctype html>
<html>
  <head>
    <title>Selectivizr Test</title>
    <link rel="stylesheet" href="style.css">
  </head>
  <body>

    <div>Hello World</div>

    <script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
    <!--[if lt IE 9]>
      <script src="selectivizr2.js"></script>
    <![endif]-->
  </body>
</html>
div:nth-of-type(1) {
  background: blue;
}

That's it. That's how polyfills typically work. Load the .js and bam!

The only people downloading this file will be people below IE9. This means we're not punishing people using modern browsers.

How can I test my site in IE7-IE8?

  • Use a Virtual Machine
    • Learn how to install and setup VMs with VirtualBox. It's cross-platform and there are probably lots of YouTube videos on it so grab a :coffee: and enjoy.
    • Microsoft offers Windows images specifically so you can try out old browsers.
    • IEVMS is the incredibly easy way to get/maintain these VMs.
  • BrowserStack is expensive and slow, but if you can't figure out the other techniques you can use it. I highly suggest you figure out how to use VMs though. It's a skill worth learning.

I'm not even sure how to test in IE6 anymore, but... seriously?

Why shouldn't I use X?

  • bower install selectivizr installs Selectivizr 1.0.2. 1.0.2 sucks and doesn't work with a bunch of other tools like the wonderful calc-polyfill.
  • https://github.com/keithclark/selectivizr is unmaintained.
  • https://github.com/Mediamoose/selectivizr has issues closed and is broken on Bower.
  • https://github.com/shinnn/lt-ie-9 is unmaintained and does more than just Selectivizr anyway.
  • bower install selectivizr-latest was what this project was until I decided to actually maintain it.

Caveats

TBH, I'm not an amazing JS developer yet, so I really have no idea wtf is going on. I'm happy to merge stuff as long as it seems legit but I'm probably not going to spend a ton of time working on this codebase.