this seems a little too specific (it assumes 1 or two mobify scripts at the start). Maybe here a for-loop or .filter() might be appropriate.