Update indexer.js

added link function