-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowed extension to use clipboard content to generate QR code when permission given #337
Conversation
…ting copy from clipboard option but only seems to trigger when setting is manually turned off and not during initial select
…sion is manually toggled off
Hi @rugk I'm ready for a review whenever your free! |
@@ -17,6 +18,13 @@ | |||
const REMEBER_SIZE_INTERVAL = 500; // sec | |||
const CONTRAST_MESSAGE_ID = "contrast"; | |||
|
|||
const CLIPBOARD_READ_PERMISSION = { |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues Note
permissions: ["clipboardRead"] | ||
}; | ||
|
||
const MESSAGE_CLIPBOARD_READ_PERMISSION = "getClipboardContentPermissionInfo"; |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues Note
@@ -30,6 +30,10 @@ | |||
console.info("UserInterface module loaded."); | |||
}); | |||
|
|||
const CLIPBOARD_READ_PERMISSION = { |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues Note
return selection; | ||
}); | ||
}); | ||
|
||
// check for clipboard text if option is enabled and if extension has permission to read from clipboard | ||
// if the clipboard is empty it rejects the promise | ||
const gettingClipboard = AddonSettings.get("autoGetClipboardContent").then((autoGetClipboardContent) => { |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review just showed some superfluous lines.
Thanks a lot!
Hi @rugk I fixed the spacing issues and added the missing semicolons let me know if there is anything else! |
Okay that was also partially my bad, sorry, because the lib was not really documented in a good way. Added that now/did that now: https://github.com/TinyWebEx/PermissionRequest/tree/master?tab=readme-ov-file#required-translation And fixed the issue here. |
BTW: Next time, try to avoid doing a pull request from the main/master branch, because you can run into problems when you have a "non-clean" main that does not follow this repo here (i.e. "upstream"). See this article for details. Anyway, this is only a tip for the next time. 😃 |
…ght) being taken than needed Even when all child elements were hidden.
Okay, fixed a small style issue, where the height would be too much when no permission request was shown below the option. See 71f0932 |
Next time, FYI you can (automatically) let issues close when a PR is merged by adding some "magic" text to your PR body. (Manually did it now.) |
PR for this issue #282. Allows the user to create QR codes from copied text from the clipboard granted they give permission to allow the extension to read from the clipboard and turn the setting on. If the clipboard is empty defaults the current tabs URL