Chrome Extension for selecting a text and save as a bookmark? - google-chrome-extension

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.

Related

Selenium Webdriver: Click on Download PDF to download the file

I am using selenium webdriver to automate downloading PDF files. Doing it manually I get the PDF opening in a new tab, the file downloads and the tab closes automatically (No preview window or anything, just opens in a new tab, the file downloads and the tab automatically closes). But when I am using selenium to click on the same "Download PDF" button, nothing is happening. When I check to find the url of the pdf, I only get the following link: javascript:void(0); as the href attribute for the button. Screenshot of the inspect element
How can I accomplish this?
Thank You

Convert HTML to PDF in node Js and open in new tab in browser without saving it

I am getting suggestion to use html-pdf npm package but it downloads the converted pdf file and I want to download only when clicked on download pdf button else I just want to open it in new tab or window without downloading. Any suggestions please? Thanks in advance.
PDF is not viewable in a clients browser like an image or text.
It is for all intents a bitstream DOCUMENT file, like say a DocX so it needs Binary applications to view it, and some powerhouse browsers include a built in PDF.js EXTENSION/ Foxit/Skia application/pdf PLUGIN.
So just like viewing a DocX or Video you need to download PDF to the device and view in a binary.pdf AEIOU viewport (Ahref/Embed/Iframe/Object/cUrl)
So you cannot just dictate "open a tab" or "open a window" to view PDF until after the download. Opening a window or target a _blank tab is anti-social and usually blocked by virus security. Likewise binary in Iframe will often be blocked.
So on a positive note how to offer a PDF (href and iframe are the 2 recommended) one way is to offer a thumbnail of the expected download. Thus you can use pictures to overlay a download <a href="file.Pdf" download> <img src=.... something like this:-
Or HOPE a user is using out of the box view InlineFrames even if their pop-up blocker stops new tabs and new windows.
Or you could use a Page to PDF print method, but it will offer to save the Download or Printout.

Autofill Search Chrome Devtools with string

Is there a way to autofilled the Chrome Devtools search files panel with a string coming from a Chrome extension? See image attached. .
My goal is to either open the search devtools automatically with a string or dynamically know the files names an object is referenced in (for a Chrome extension).

VBA Insert .csv from website, .csv not in url

I am trying to figure out if there is a way with VBA to download the .csv file at the bottom left of the screen named "Download" at this link:
http://www.redfin.com/homes-for-sale#!excl_ss=true&market=socal&max_price=300000&min_price=50000&num_baths=1.0&num_beds=1&region_id=11203&region_type=6&time_on_market_range=30-&uipt=2&v=8
The .csv doesn't appear to be attached to a URL, which I know how to import, but I can't figure this out. Any help would be appreciated.
Matt
Try this URL:
http://www.redfin.com/stingray/do/gis-search?market=socal&region_id=11203&region_type=6&excl_ss=true&hoa=&max_listing_approx_size=&max_num_beds=&max_parcel_size=&max_price=300000&max_year_built=&min_listing_approx_size=&min_parcel_size=&min_price=50000&min_year_built=&num_baths=1.0&num_beds=1&open_house=&pkg=-&rd=&sf=1%2C2%2C3&sold_within_days=&status=1&time_on_market_range=30-&uipt=2&v=8&num_homes=500&sp=t&al=1&render=csv
There is actually a URL, it's just hidden and is accessed via some JavaScript Code.
In general, if you're wondering which URL is being used, try the following:
In Chrome:
Press Ctrl-Shift-J; this should bring up the debug console.
Click on a button on the bottom left to undock the debug console for convenience; it should now be in a separate window.
Go to 'Network' tab.
On the website, click the link to download CSV file.
Watch for new items appearing in the "Network" tab. One of them is likely the request to download the CSV file. Try right-clicking on it, and selecting "Open in a new tab". If you end up with the CSV file download dialog, then that's the URL you were looking for.
In Firefox:
Install FireBug plug-in, and do something similar to Chrome.
Of course it does:
http://www.redfin.com/stingray/do/gis-search?market=socal&region_id=11203&region_type=6&excl_ss=true&hoa=&max_listing_approx_size=&max_num_beds=&max_parcel_size=&max_price=300000&max_year_built=&min_listing_approx_size=&min_parcel_size=&min_price=50000&min_year_built=&num_baths=1.0&num_beds=1&open_house=&pkg=-&rd=&sf=1%2C2%2C3&sold_within_days=&status=1&time_on_market_range=30-&uipt=2&v=8&num_homes=500&sp=t&al=1&render=csv
You can find the URL by using the Developer Tools of IE, like so:
Open the website and press F12
In the window that appears (Developer Tools), select the Pointer Icon
After selecting the Pointer Icon, click the Download Link on the website
In the Developer Tools window you will notice a lot of HTML appears with a line selected; this line contains the link to the CSV.
Select the text in the downloadCsv function within that line: list.downloadCsv('...text to select...')
Add the copied text after http://www.redfin.com in the URL.

How to get selected text in Chrome

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

Resources