Revised html-includes script, to work for iOS