Is there way to run native C/C++/Obj-C within a google chrome extension, The official page says extension are like other web pages, as i see it there is no way except Native Client(NaCl). Is this technically possible.
I believe that you are looking for NPAPI plugins. Do not take lightly the warning, however:
NPAPI is a really big hammer that should only be used when no other approach will work.
Why does your extension need C/C++/Objective-C, exactly?
Re: OP comment
Check out this question!
Related
Say, I want to develop an alternative spellcheck module to google docs.
This means that I have to get corrections from my backend, and color the misspelled text's background, and do a small popup bubble when user hovers over it, where I'd display the correction. (please mind that spellcheck is not the actual goal of my project, but it does address my problems in a more simplified way)
What are my options? Any ideas how to do this?
Few possible solutions I came up with:
Chrome extension vs Apps script
Chrome extension
pros: user has to grant permissions once, can freely traverse and append anything to dom via content script
cons: is a "hacky" way, if google changes classnames or js source, it would stop working, and also, reverse engineering google docs's editor engine is impossible
Apps script
pros: supported by google: if it works, I dont need to be afraid of docs updates
cons: it seems to me that I can't just fiddle with the dom (because of Caja compiler), has very limited support (if any) for custom highlighting or hover functionality.
As I see it, neither of these are perfect solutions for this project. What do you think? Any suggestions are very welcomed.
I know this is an old question, but I have recently gotten into the same problem, and believe I have a solution. So for future Googler's I will post my answer here.
My solution was to create a Chrome Extension and understand how the Google Docs DOM's are structures to interact with it.
You can find my code to work with the Google Doc DOM's here
In Apps Script you can't "fiddle" with the DOM and you won't be able to implement hover functionality. Also, a lame Highlighting would involve changing the current document itself (which would go to revision history, undo queue, etc)
Therefore, your only altertive is the Chrome Extension. But I agree with you on the cons. It is a super hard task that could break at any minute without notice.
Im looking to get more into programming, and I've decided to look into creating a browser extension. This is exactly the kind of project I've been looking for to get stuck into programming web stuff but I'm new to it so I don't know where to start.
Could anyone suggest the different things I should look into?
The only programming experience I have so far is in Matlab. I've looked into C on and off in the past I but I have no practical experience with it.
I've started to have a look at Twando, an open source program which schedules tweets on Twitter where I'm going through and understanding all the code for that program (mostly php).
Afterwards I'll look more carefully at how to write Chrome browser extensions and then probably look into how to make 3rd party programs work with Twitter, Pinterest etc.
Am I looking along the right lines? Any constructive criticism will be appreciated.
I think you could do this using Javascript (and maybe JQuery, which is a library for Javascript that makes it easier/adds alot of easy to use functions).
For the basics:
http://developer.chrome.com/extensions/getstarted
This is great for learing to work with JSON and chrome extensions:
http://lifehacker.com/5857721/how-to-build-a-chrome-extension
What you could also do is download a simple extension from the "store" and open it to check what's inside. This helped me the most with learning Javascript and JQuery.
Currently I am coding my google-chrome-extensions using a combination of notepad and the chrome console. I am 100% sure that there is a better way of programming these extensions. What environments are people using?
I'm using Notepad++ which works beautifully.
You might consider trying the crossrider beta to build cross-browser extensions. I've found the experience on Chrome superb so far.
Your preferred IDE (eg. NetBeans) and Google Chrome (you have to test on something, right?).
You might want to check:
NetBean 7.0 (They have a great version for web development that let you write HTML,CSS and JS with all the great code sniff/highlight/complete stuff)
Eclipse got some good version for web dev (PDT and others).
Notepad++ , UltraEdit, TextPad or any other good editor you like.
As for the debug, profile and test mode - you have the developers tool in Chrome that are excellent. You might want to check out this short video that give lots of useful tips:
http://www.youtube.com/watch?v=nOEw9iiopwI
Good luck!
I would like to get into Plugin development using the Gmail API and as such I would like to ask those who already have experience in it a few questions.
What language / languages should I be familiar with? I'm not familiar with Python, PHP, or JavaScript. Will I need to pick up on these?
What level of control do I have on what my plugin can do? Can I for example change the interface or add shortcuts or RSS feeds as a sidebar?
I know a lot of the examples mentioned already exist but I would like to try my own hand at it.
Peter posted a solid list of the official Gmail APIs.
On the other hand, most of the major plugins that you may have heard about are browser plugins that just modify the page source directly, even though there's no official API for it. There used to be a GreaseMonkey API that was a good starting point, but that wasn't supported and no longer works. Best place to start is with a copy of Chrome, creating a content-injection plugin that works on the Gmail page.
Happy to provide some further details if you can clarify what you're going for since I went through this myself a few months back.
I need to launch an external application from a Google Chrome extension. I need to pass a few parameters from javascript, wait until the external application is done and then use its output in javascript.
I did some reading and this should be possible using an NPAPI plugin (I only care about Windows so far).
Since my C/C++ got very rusty over the years and my requirements are quite simple I was wondering if somebody knows about a ready-to-use NPAPI DLL that does just the one thing I need: Launch an EXE with several parameters and return its output?
I tried Google of course, but didn't find anything. Thanks a lot.
It should be rather easy to write such a plugin in C++ with Firebreath. Writing a NPAPI plugin from scratch can be tricky, but luckily Firebreath abstracts away most of the details and makes it much easier.
As a plus, if you base the plugin on Firebreath, in addition to NPAPI on Windows you pretty much get free support for NPAPI on Mac/Linux and ActiveX on Windows.
http://www.firebreath.org