Open JohnVeness opened 2 years ago
Hello. I'm trying to set a shortcut key to click on a button with a particular text on a website. The JS code is:
document.evaluate("//span[text()='Upgrade the tags']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentElement.parentElement.click();
However, if I try this (after assigning it to a key in ShortKeys Options), it does no effect in Firefox. Looking in the console, I see the error:
Content Security Policy: The page's settings blocked the loading of a resource at inline ("script-src").
Doing the same in Chrome has no such problems.
The site I'm trying this on is openstreetmap.org (specifically, the editor) - you would need to create an account there if you wanted to test this.
Any ideas on why this isn't working in Firefox?
Many thanks for this extension :)
Same here, have not figured out a solution yet.
Hello. I'm trying to set a shortcut key to click on a button with a particular text on a website. The JS code is:
document.evaluate("//span[text()='Upgrade the tags']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentElement.parentElement.click();
However, if I try this (after assigning it to a key in ShortKeys Options), it does no effect in Firefox. Looking in the console, I see the error:
Content Security Policy: The page's settings blocked the loading of a resource at inline ("script-src").
Doing the same in Chrome has no such problems.
The site I'm trying this on is openstreetmap.org (specifically, the editor) - you would need to create an account there if you wanted to test this.
Any ideas on why this isn't working in Firefox?
Many thanks for this extension :)