window.getSelection().toString() doesn't get selected text in Chrome.
How can I do that?
Remember, that should be done within a content script, I explained how its done here:
Chrome Extension: how to capture selected text and send to a web service
Related
This question already has an answer here:
chrome extension: how to bind/hook to the browser's "search invoked" event?
(1 answer)
Closed 5 years ago.
Is there a way to access the find box from a chrome extension? I want to manipulate the text in the find box when the user hits ctrl+f
There is no way to directly access the Find Dialog when it is called/invoked. These are based on the solutions on the related question - Chrome Extension: How can I show the find bar and supply text for it? and chrome extension: how to bind/hook to the browser's “search invoked” event?
However, the workaround for this is use the Command API or window.find().
Command API
You can try chrome.commands, use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.
Hope this helps.
Can a Chrome Extension read what is typed by the user in text boxes?
For example, text entered by the users in the Google Search bar or while the user is posting something on Facebook.
Yes, it can. It requires a Content Script to access.
I am using a command line script to open a particular web page in Chrome and send keypresses to that web page
When Google Chrome opens for the 1st time chrome opens up its own Tab e.g. welcome to chrome/login to chrome and this throws everything off.
I dont want any new tabs generated I want only the web page I asked for
Is there a command line switch or method to force chrome to not generate its own tabs. Perhaps registry entry etc?
I have tried some but no success so far
Thanks
Confuseis
Since your question contains the AutoIt tag, I have to assume you want an AutoIt solution.
The best way to do this would be to use chromes --new-window command line switch. This opens a new instance of Chrome, with a single tab pointing to the URL provided, by executing the chrome executable via ShellExecute.
$sPath = #HomeDrive & "\Program Files (x86)\Google\Chrome\Application"
ShellExecute($sPath & '\chrome.exe', '--new-window "https://www.google.com/"', $sPath, "", #SW_MINIMIZE)
I'm trying to get full screenshot of HTML mail on Gmail.
Chrome extensions which like Screen Capture (by Google) does't work enough.
What should I do?
You'll not be able to take the complete screenshot of an email in Gmail default window. You need to take a different route to accomplish this i.e.
Click on the Print, it will open a new tab with Print dialogue.
Close/Cancel the Print dialogue (don't close the new tab).
Use Nimbus Screenshot or any other extension to take the screenshot of the HTML email.
Yes, Screen Capture by Google doesn't work for a long time. I recommend you Nimbus Screenshot. It is also a Chrome screenshot extension. And I just used it to get a full screenshot of HTML mail on Gmail. Hope it works for you.
I have tried everything with Nimbus but it simply wont work. Fragment Area takes the entire screenshot but only the visible part is saved rest image is blank.
Instead try clicking on the 'Print' icon on the upper right corner of your mail and save it as PDF.
I need to code a chrome extension,Selected text of web page has to be saved in to extension similar as a bookmark.please help.