code: function inject (tag, shims){
        var added = shims.some(function(shim){
          var i = html.lastIndexOf(shim);
          if (i !== -1) {
            html = html.substr(0, i) + tag + html.substr(i);
            return true;
          }
          return false;
        });
        // Failing that, just append it.
        if (! added) {
          html += tag;
        }
      }
docs: Inject some text before a specified tag