I want to keep track from all the browser tabs I have opened. I searched it a bit and found out that I can achieve this with this command (for Chrome) chrome.tabs.query
So, do I need to build an extension for Chrome for this to work or I can achieve this with some Javascript code for example? (I think the first case)
Thanks in advance.
So, do I need to build an extension for Chrome for this to work
Yes. It would be a huge security problem if any website could monitor what happened in all other tabs open in the same browser.
or I can achieve this with some Javascript code for example?
Chrome Extensions are written in JS.
Related
Is it possible to open the client's web console in javascript (CTRL+SHIFT+K on Firefox)? Define the size, the position, else?
Thank you
I haven't heard of this being possible, and I couldn't find anything in a recent search about how to do it either. I did find another stackoverflow conversation about something similar here: Can I programmatically open the devtools from a Google Chrome extension?
From that, I surmise that if it's not possible from a browser extension, it seems even less likely to be possible from plain JavaScript.
I'm looking for a way to record every thing I do in Chrome Devtools so I can play it back verbatim. I've seen a lot of docs on how to manipulate page content, track page performance and behavior etc from devtools extensions, but nothing yet about actually watching what I do in Chrome Devtools itself. I'd be willing to write an extension if that's what needed. The goal is a teaching tool where I can record things I'm doing in devtools and play them back. (Of course, one could use a GIF recorder but that's so 00's). Something I've looked a little bit at so far is chrome devtools protocol viewer but not sure if it could accomplish the task.
Can anybody suggest a potential way to accomplish this? Thanks in advance!
Now Chrome has an inbuilt recorder tool available in the Dev Tools. Much better than installing any 3rd party extension. Additionally, there are many more features to track the user journey.
Recorder in Chrome Dev Tools
You may try using Desktop Capture API which can be used to capture content of screen, individual windows or tabs. Here's a demo app that shows you how to use a Chrome extension to access the desktopCapture API in your web-application. Additional reference which might help: In chrome extensions, is there a way to record screen without ssl?
I'm attempting to find a bottleneck in my Javascript. Basically I'm developing a chrome extension written in Javascript which is taking 4-5 seconds to perform a task. There's a lot of code involved in the task and using print statements / chrome built in dev tools just isnt working. The dev tools don't seem to even see my Javascript running. I'm wondering if anyone has any advice / tools they think could be of benefit?
Open your page in Chrome.
Tools -> Developer tools -> Profiles
Start Profiling (3rd button, grey circle on the status bar at the bottom)
Perhaps it'd be a good idea to open the HTML files in Firefox instead of letting Chrome extensions handle it. That'd allow you to use Firebug to determine any causes, which would be very helpful.
I remember Google Chrome has a built-in JavaScript profiler. Or can't you use this for your extension? (I have never built Chrome extensions.)
You can try to use Profiler as it was mentioned before or Timeline.
Timeline will help you if the time was spent in native code.
I want to write a firefox addon that replaces my current default download feature.
I basically just want to add other options to the download window that will allow it to interact with my website.
Where do I get started with this? Does anyone know any code I can get started from? I'd rather not build the entire download from scratch, it seems like a lot of work...
Thanks,
Matt
I'd probably start by looking at the source code to an existing extension which does this.
I have to create a plug-in that will have to display information when user hovers over certain terms. Can anyone show me the direction how to do it?
I do not have much ideas about creating plug-ins. I know what i want to do can be done by java script. But can a java script file be installed as a browser plug in? any ideas on this will be appreciated! Thanks!
What you want to do is create a userscript. It's exactly what you're describing: a piece of javascript code installed in the browser as a plugin.
Userscripts are supported:
By Firefox using Greasemonkey
By IE with its own version of Greasemonkey
Natively (soon) by Google Chrome
Natively by Opera
And even by Safari
So support is on almost every major browser.
A userscript is the easiest solution for what you're trying to do.
Kango's Content Scripts are similar to userscripts, with perhaps better support for all browsers, and the extension (and thus also the user script) can be installed with one click if self-hosted instead of installing Greasemonkey separately.