fixed background script bug when browser action clicked without any tabs activited, wired in history so it can be used while other work is done on front end