Update pageScanner.js

Working version