didierfred / SimpleModifyHeaders

Extension for firefox and chrome to modify headers
172 stars 31 forks source link

Semicolon to separate URL patterns doesn't work #13

Open ysrn opened 5 years ago

ysrn commented 5 years ago

Using FF 68.0.1. URL pattern of: *://*.x.com/* -- working great. URL pattern of: *://*.x.com/*; *://*.y.com/* -- never gets applied either to x.com nor y.com.

I see the next version allows assigning rules to specific URLs, so maybe that's already covered.

EDIT: It was the space after the semicolon. Doh. In my defense it's fairly common to want it there :) Using target.split(/\s*;\s*/) would be appreciated.

didierfred commented 5 years ago

I will add this to the next version

didierfred commented 3 years ago

done in release 1.7.0

see commit https://github.com/didierfred/SimpleModifyHeaders/commit/ea11a7a52c7e6701f151bae3665cf455b26b94f2

ysrn commented 3 years ago

Not quite... s.replace(' ','') will only replace the first space in the string. You want s.replace(/\s/g,'')

didierfred commented 3 years ago

yes you are right , i reopen the issue