You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Hello. Thank you for the very useful plugin. In my case, however, I needed the ability to exclude certain selectors from receiving the prefix. I modified the code a bit and added an exclude option, which should be an array of RegExp's against which to test the selectors, before prepending anything:
...
var selectorExcluded = function (regexp) {
return regexp.test(selector)
}
if (selector.startsWith(opts.selector.trim()) || opts.exclude.some(selectorExcluded)) {
return selector
}
return opts.selector + selector
...
Hello. Thank you for the very useful plugin. In my case, however, I needed the ability to exclude certain selectors from receiving the prefix. I modified the code a bit and added an
exclude
option, which should be an array of RegExp's against which to test the selectors, before prepending anything:which could be used like:
It seems to be working, so I thought I'd share the idea in case you're interested in incorporating into the plugin.
The text was updated successfully, but these errors were encountered: