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
I'll consider adding the following script to be available in the global scope but currently didn't want to make that URL testing part of the UI since the use cases I ran into usually lead me to testing for different locations in one script block several times (related addresses on the same website).
What I'm currently running with is a separate code block for self defined helper and background scripts among of which is:
testLocation = function (pattern, callback) {
if (new RegExp(pattern).test(window.location.href)) {
if (arguments.length > 2) {
callback.apply(null, Array.prototype.slice.call(arguments, 2));
} else {
callback();
}
}
};
Currently have some partial code to provide the functionality to define regular expression URL match as a first line of the code block as in the example below. Any better ideas?
Sadly lacking the time in the near feature to finish this.
LionelMarbot
changed the title
Feature requeset: Option to define in which website code shall be run (instead of everywhere)
Feature request: Option to define in which website code shall be run (instead of everywhere)
Jan 9, 2019
Hi,
Thank you for your plugin! It would be great if one could define where the code shall be run automatically, instead of everywhere.
Best would be to be able to define the URL (also using regular expression) per code snippet that is store in the extension.
Thank you!
Best,
Lionel
The text was updated successfully, but these errors were encountered: