Implemented isMainFrame
made work for single.js