Skip to main content
deleted 38 characters in body
Source Link
Alnitak
  • 340.8k
  • 72
  • 420
  • 503

There's no need for a regexp, just do:

var element = this.get(0);
element.href += 'string_to_be_appended';

e.g.

elementthis.href += '&preroll=' + encodeURIComponent(Kdp3State.preroll);

Note the use of encodeURIComponent to ensure that any special characters (+, %, etc) in the resulting URI are correctly encoded.

There's no need for a regexp, just do:

var element = this.get(0);
element.href += 'string_to_be_appended';

e.g.

element.href += '&preroll=' + encodeURIComponent(Kdp3State.preroll);

Note the use of encodeURIComponent to ensure that any special characters (+, %, etc) in the resulting URI are correctly encoded.

There's no need for a regexp, just do:

this.href += 'string_to_be_appended';

e.g.

this.href += '&preroll=' + encodeURIComponent(Kdp3State.preroll);

Note the use of encodeURIComponent to ensure that any special characters (+, %, etc) in the resulting URI are correctly encoded.

added 211 characters in body; added 38 characters in body
Source Link
Alnitak
  • 340.8k
  • 72
  • 420
  • 503

There's no need for a regexp, just do:

var element = this.get(0);
element.href += 'string_to_be_appended';

e.g.

element.href += '&preroll=' + encodeURIComponent(Kdp3State.preroll);

Note the use of encodeURIComponent to ensure that any special characters (+, %, etc) in the resulting URI are correctly encoded.

There's no need for a regexp, just do:

this.href += 'string_to_be_appended';

There's no need for a regexp, just do:

var element = this.get(0);
element.href += 'string_to_be_appended';

e.g.

element.href += '&preroll=' + encodeURIComponent(Kdp3State.preroll);

Note the use of encodeURIComponent to ensure that any special characters (+, %, etc) in the resulting URI are correctly encoded.

Source Link
Alnitak
  • 340.8k
  • 72
  • 420
  • 503

There's no need for a regexp, just do:

this.href += 'string_to_be_appended';