Is there a JS framework or library to add text/check box to gmail UI?
Please note that the data contained there will be sent through AJAX - JSON object to a particular server.
Idea is to make a Chrome extension with this functionality.
Something similar to:
Thanks.
You can write Greasemonkey script for that. It's supported by Google Chrome by default.
Related
Can anyone tell me how can i write a Google Chrome extension which is contains a rest api?
I would like send a rest (HTTP GET) request (or something like that) from C# Windows Form project to my custom Google chrome extension. That time extension will handle this and show chrome on top windows and should execute another script. (a JS function on another script file).
Thanks for your answers in advance.
I am studying about the project in which I have to extract the data from the website . The project is in java and the website is in java script . I am using Jsoup to extract the data from the website But there are some modal windows(dialogue box , pop up windows) present in the web page.So Is it possible to extract the data of modal windows using jsoup?????
So if answer is yes , then how could I do it?? please provide links and if not, then what are the other best ways to do it???
Thanks for your help. I really appreciate it.
I assume that the modal is generated by Javascript.
Jsoup is just a parser. This means that it will make an HTTP request (GET or POST, whatever you tell it to do) and the server (website) will respond with the initial html. By saying initial, I mean the html before any javascript is executed.
Javascript can generate html (like the modal in question), but this is not visible to Jsoup because a parser can only read, it cannot execute code. The browser is able to generate the modal because it includes a Javascript execution engine that parses and executes Javascript.
When you visit a web page you don't know what is dynamic (generated by Javascript) and what is static (fetched by the server as is).
A little trick to check what is dynamic and what is static (static is visible to Jsoup) is to do the following:
Visit the web page you want to parse (with chrome if possible, mozilla will work too I think).
Press Ctrl + U. This will open a new tab.
The new tab will contain some mesh of html, css and js. This is what the server fetches to the browser and is also visible to Jsoup.
If the modal is in there, then great, it is visible to Jsoup. If not, then you have to use a library that acts as a headless browser.
A headless browser is essentially a browser without the graphical interface. It can parse and execute Javascript. It "sees" what a normal browser sees.
The most common library used is selenium webdriver. Be careful, selenium is a testing framework that has a lot of parts. What you need is the webdriver.
There a lot of examples out there with ready made code to get you started.
Can we embed a website inside a firefox addon. I am currently building an addon with multiple functions and though addon is appropriate for few functions, website is better for rest of the functions.
If I intend to create an addon and also have website embeded inside it for some of the operations, is it possible. How do we do it?
Yes, you can have web-content in a Firefox addon, but be very careful or else the web page (or anything that intercepts the web page) will have access to everything Firefox itself could do!
If you use an XUL iframe (or any iframe element or runnable data inserted from untrusted content in Chrome:// context), please read this article carefully:
https://developer.mozilla.org/en-US/docs/Displaying_web_content_in_an_extension_without_security_issues
I'd advise to use iframes for this one.
Check:
http://www.w3schools.com/tags/tag_iframe.asp
and
http://webdesign.about.com/od/iframes/a/aaiframe.htm
see my addon here: https://addons.mozilla.org/en-US/firefox/addon/xpicompiler/
see about:addons-memory addon here: https://addons.mozilla.org/en-US/firefox/addon/about-addons-memory/
very simple addons, they contain a webpage. and in the manifest file we have set contentaccesible=true
in my addon if you type about:xpiler you get to that pgae
in the other addon if you type in the url bar about:addons-memory you get to his page.
if you need help i can write a demo for you in 10 minutes
I wanna know if it is possible to autofill an html form of a website (not local) using javascript, and if it is possible can you please put me in the right direction.
Edit : I have one mozilla extension that has some dropdowns, textareas ... from which i will get the data i want to put in the form.
Thanks.
JavaScript, running on a website, cannot cause a visitor's browser to go to another website and pre-fill a form there. This would be a serious security issue.
JavaScript running in a browser extension can, but the specifics depend on the specific type of browser extension. (i.e. Chrome Extensions and Greasemonkey extensions are different).
JavaScript running on a server (e.g. via Node.js) can go to another site and fill out a form there (e.g. with PhantomJS). It can't present the filled in form to the user without acting as a full proxy though.
I'm writing a Chrome extension to add Google Maps autocomplete to Google Calendar's new event location input. I'm trying to load the library in the extension context but it blocks saying [blocked] The page at domain.com ran insecure content from anotherdomain.com.
I of course have added http://anotherdomain.com to the manfest.json in the "permissions" key. In order to load the actual places library I just downloaded it from http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true, since i didn't know how to add it directly to the extension.
So far, it seems it is impossible, so I just used the JSON API and jQuery UI's autocomplete. Here's my trivial implementation https://gist.github.com/3623683