JS to keep keep port/stock_port somewhat in sync