I'm trying to create a simple google chrome extension with 2 or 3 browser actions. I've been using selenium IDE to record the steps through Firefox I want to use. However, I don't know how to take those steps and put them into a coding language for Google Chrome in a .json so I can upload. I'm a beginner and have little coding knowledge, if someone could lead me in the right direction that would be great. Thanks for your time!
To begin, you will need some basic knowledge of JavaScript (and possibly HTML and CSS) for experimenting and asking further questions. These are the tools used to build Chrome extensions.
Here are some good places to learn from:
Khan Academy - Intro to JS
Codecademy - JavaScript track
After that, IBM's tutorial for Chrome extensions is a must-read.
Further on down the line, there are tools that make the process of developing extensions easier and/or faster, etc. such as Extension Maker and Crossrider.
Enjoy!
Related
I'm making a game with HTML/CSS/Javascript because it's the code I'm most comfortable with at the moment. I'm only really doing this as an exercise in game development and plan to learn C# later. But for now that's what I'm using, and I have a question about it.
Obviously when making a website, you want your website to be compatible with all web browsers equally. Right now, I'm using Chrome to test/debug my game, and I've decided to develop this game with Chrome in mind. But not everybody has Chrome, and not everyone would want to download it in order to play my game.
Is there a way to run an HTML/CSS/Javascript file in a Google Chrome "environment" without having the actual browser installed? Just it's code engine and none of the rest of the browser.
I've been reading about their V8 Javascript engine that they use in Chrome, and am wondering if that is part of the answer I'm looking for. What I'd like to do is include this "engine" in an installer with my game files and have it install like any other game.
Hopefully this makes sense. This may not be possible/exist, but if someone knows something I don't or an point me in the right direction, that'd be amazing. Thanks!
You could look into Node-webkit which essentially allows you to write desktop applications in html/css/js. When you distribute your game along with your node webkit executable, it is always run in the same environment. You can see some cool examples on their demos and examples page.
Usually a common path to convert web application to native desktop applications is to use a "thin" browser as app container and ship it.
A lot of current applications out there are using this trick (Spotify, Slack, etc...) and it works pretty well.
I've read of some people using the CocoonJS game engine framework and successfully ship it with this techniques.
To most famous wrappers, that I know are node-webkit or electron (AKA atom-shell).
Once you include your game in either one of those you can just "compile" it (it is not a real compile, but just to give you an idea) and ship it: with some tricks it is also possible to publish it in the Mac/Win app stores.
In case you want to focus on mobile instead, there are similar frameworks but I don't really know which are the most common.
Note: if you're using fancy WebGL or very advanced stuff these tools may have some issues sometimes.
So essentially you want to install the JS engine to use it with any browser? In this case, the answer is: nope. Browsers act different, they don't have a standard interface, nor have this "swapping" capability in mind.
In case you'd be asking for an embedded browser inside an app... well, isn't that worse than installing Chrome? You may embed webkit/V8, but it's a hard way and you'd know programming.
So simple answer is: you'd make it compatible for at least the evergreen browsers (Chrome / Firefox mainly). Or reduce your target to webkit based only browsers (or in your case V8, i.e. Chrome, Chromium and the forks).
If you want that your game is only for chrome, because you read V8 documentation, you can create it as an extension. There'sn't other way to install your JS, because browser interpret javascript, not compile it. And the docs you need is found at: https://developer.chrome.com/extensions/getstarted
I was wondering..
I'm now getting even lazy to copy-paste my complete JS commands that I used to insert into the JavaScript console of my chrome browser.
Could there be a way to program something that will do this job for me?
what sort of programming techniques should I learn?
I would be grateful if anyone could give me some place to start.
I work on the Chrome team. Last year we introduced a useful feature called Snippets to the Chrome Developer Tools which should help with this exact use-case. You can find out more information about it at: https://developers.google.com/chrome-developer-tools/docs/authoring-development-workflow#snippets
I was wondering if anyone could provide me with some links to some tutorials or explain (with some example code), how I would go about making a simple google chrome extension (or in any programming language or browser if that is impossible), how I would make an extension that can visit a specific site, fill a login form on that site, click some links and then do the same sort of thing on the linked to site.
Thanks
Personally, I would not use a chrome extension, but maybe a perl script. There is an extension called WWW::Mechanize that is designed exactly to do this kind of stuff.
You can find plenty of tutorials and examples, just google it.
Edit in 2021: the above recommendation has become a bit outdated since 2013. For a more up-to-date take, I'd still recommend a scriptable headless browser instead of an extension for most automation tasks, but probably not WWW:Mechanize. There are good lists of options, such as this one.
I have an idea for a project that has to do with helping people learn to program. One of the things I think would be cool would be to have a place on the site where you can edit JavaScript code in real time in your browser.
I know there are a number of web-based JavaScript editors, but I haven't been able to find out if there are any tools that let you debug JavaScript from your browser. I think being able to step through your code is a valuable learning experience for people who are new to programming. It seems like something along those lines should be possible, though.
I originally thought you could use something like Firebug Lite: http://getfirebug.com/firebuglite, but they don't support debugging. Is this just too hard of a problem to solve in JavaScript?
I suggest you try Cloud9. It is a full-featured web based IDE for Javascript, which includes a great debugger. It is free for open source projects, which I imagine would include most learning purposes.
Why not just use the build in Javascript console from the browser? Every modern browser has this feature.
I would like to create a extension for Google Chrome/Mozilla for the following requirement.
If I search for any text in a web page, If text is found then automatically background colour has to be added to that text.Basically it will be done by browser. But multiple searches are possible. So I need to make all the searched and found texts highlighted. I know very basics of writing extensions for Google chrome( I have learnt through http://code.google.com/chrome/extensions/getstarted.html ) . I have good knowledge on JavaScript. I don't have any basic idea to achieve the solution for my requirement. Please someone guide me on how to proceed further.
Although I don't have an answer for Google Chrome, making a Firefox addon is simple.
Take a look at the addon SDK and addon builder and the documentation for it. The first tutorial outlines the setups you will need to take and it should help get you started. Also, ou will probably need the page-mod library.