Update grayscale.js

use this, so this function is more precise when the navbar is expanded

problem: how to fix the doubled active entry in navbar when using this?