Chrome 21.0.1180.83m - where is devtools.js located? - google-chrome

I want to perform a hack on devtools.js to expand all of the DOM elements by default. I read in another post on here that this was possible.
However, I can't find devtools.js, or for that matter, the Application folder that supposedly exists at C:\Users\Administrator\AppData\Local\Google\Chrome. I've tried this both on my Windows 7 laptop and my Windows XP desktop (different path for the desktop, obviously) and the folder doesn't even exist...which leads me to believe it's somewhere else and named something else. I'm showing hidden folders on both machines, so that's not it, either. I even searched both computers...no devtools.js file on either one.
Where would I look for the devtools.js file?

It appears to be packed in a file called resources.pak. The package seems to contain a lot of other (binary) files as well, so I'm not sure if you're going to have much luck editing it.

Might be a bit late to the party but i was searching for a very comparable question i had and found some answers, so i thought i'd share my findings.
It seems that the devTools.js and also the other files for the DevTools front-end are packaged inside the browser.
So there is no file on your hard-drive named devTools.js, there is an option to get the source for the Developer Tools and use it as a stand alone front-end though.
On this page i found some instructions as to how you would go about using your own front-end.
http://dev.chromium.org/devtools
Good luck!
PM5544

Related

File protocol to get directory listing

I hope you can help me.
I am writing a desktop program that will run in a web browser (in HTML/CSS/javascript in case that wasn't clear). It will be entirely disconnected from the internet and obtain files and data using only FILE protocol. My question is: how can you obtain a listing of the contents of a directory referenced this way?
I've been searching for months and really turned up almost nothing! Maybe I just don't know how to search but there doesn't seem to be much information about how browsers actually deal with File protocol.
For example, when you open a directory in Chrome, it gives you a nice table with hyperlinks of all the parent directory's children. However, when you look at the source code, it's as if Chrome just magically knew exactly what files were in the directory. I feel that if I could understand how it knew that, maybe I'd be able to get somewhere...
Also, I am open to other ideas about how to get a directory listing. I've read about being able to do it with php but it requires running a server. Does anyone know if it is possible to run php code with File protocol rather than HTTP?
Thanks for reading this far and truely any information that could remove me from this standstill is appreciated!
Web Apps do not have access to the user's file system so you will not be able to do what the chrome file browser does with a web app. I believe chrome is using some sort of native code to do this.
I would recommend trying something a little more on the native-side. A chrome app will let you use html, css, javascript while also allowing you access to the file system. https://developer.chrome.com/apps/app_storage#filesystem
Another alternative is you could write some sort of native java application. That would allow you to read/write all the files you want.

Allow multiple instances of Google Chrome?

Disclaimer: This may be a better question on SuperUser, but my use
case matches SO.
I'm trying to develop an Angular app on my local computer; I'm not yet ready to set up a webserver or anything like that. I'm loading some JSON configuration files from the same directory, and I'm running into Origin Policy issues (which was expected).
I know that programs like gChat can run multiple instances with the /mutex flag (I think that's it, it's been a while since I tried that). Is there any such provision for Google Chrome? Basically, I'd like to run Chrome as my main browser for everything I do, and then open a separate instance with lowered web security for testing purposes.
Thanks!
You can bring up a development web server, serving data from the current working directory, using:
python -mSimpleHTTPServer
This doesn't directly answer your question, I know. But hopefully it's even better than a direct answer. :)
I found a solution to this - although Chrome won't let you run multiple instances, you can run Chrome and Chrome Canary side-by-side simultaneously. So now, Chrome is my main browser, and Chrome Canary (with the --disable-web-security) flag is my testing environment. So far, I haven't had any issues with discrepancies between the browsers.

Browsers Don't Display "Cruftless" links (no index.html for local web dev.)

Found an interesting article about "Cruftless" links (removing the "index.html" from links) but when I do that no browser shows the local pages.
http://www.nimblehost.com/blog/2012/11/why-cruftless-links-are-better/,
This is understandable, it's a 'file' url from a local machine, so what do people do to work on basic html sites offline? How do they preview them?
For example, no browser (understandably) will display this...
file:///JOBS/ABC/About/
... but this is fine...
file:///JOBS/ABC/About/index.html
?... so what do people do to get around this?
The meaning of file: URLs is, by definition, system-dependent. Normally browsers map them to files in the file system in a relatively straightforward manner.
Thus, a link with href value like file:///JOBS/ABC/About/ may or may not work, depending on system. It may fail, or it may open a generated document containing a directory (folder) listing, or it might do something else.
There is normally no need to get around this, and it is pointless to worry about SEO when dealing with local files.
This could, however, matter during site development when you work with a site locally (and perhaps test and demonstrate it locally). Then you might wish to have, say, About us so that it works locally as well as on a server, yielding About/index.html in both cases but without hard-wiring index.html in HTML markup.
I’m afraid the answer is “you can’t”. But as a workaound, you can install and use a local HTTP server, with settings similar to those that you will have on the real server. This means a little extra work (mainly downloading and installing and configuring software like XAMPP), but it also gives you important other benefits, like testing your pages locally with server-based features (to the extent that the real server is similar to the local server).

Custom installer for Chromium

I would like to provide an installation of Chrome (or probably Chromium?) that comes pre-installed with my extension, installed to a separate folder and has the --enable-experimental-extension-apis turned-on by default. Would also be cool to be able to customize the looks and feels to be more suitable for my brand.
Does anyone know if its allowed by Google's TOS? Is it possible? Was it done before? Is there any easy way to do that, without hacking around on Chromium source code?
If you know enough C to modify some code, mini_installer is a good place to start. This is what people would be downloading anyway, so tweaking some of the code there to suit your needs would be the best bet. Install it where you like, make whatever changes before/after the install, etc.
Otherwise, you could write some kind of script that downloads and runs the installer, and then changes settings. For compatibility with your apparent target audience, a simple batch script would be the best bet.
Another option is Chromium Portable. You make any changes you like, and upload a zip file. All they have to do is download and unzip it. Most users can manage that, but pictures on the download page don't hurt. You could also write a small program or script to download the zip file, unzip it, and run anything that needs to be run (or Chromium it self).
It's technically possible and allowed. Indeed, there are a number of forks of Chromium, such as Iron and Comodo Dragon.
Whether it's a good idea is another question entirely. Unless you're prepared to maintain your fork on a long-term basis (and in particular, to provide software updates to your users on a frequent basis), it's probably not a good idea. You'd probably do better to instruct your users to install Google Chrome normally, then give them a link to install your extension.
As far as experimental extension APIs go, I'd avoid them. They may be removed or changed significantly in future versions of Chrome. If you must use them, just instruct the user on how to enable them.

Access Google Chrome's cache

Is it possible to access Google Chrome's cache from within an extension?
I'd like to write an extension that loads a cached version of a page when the online one can't be accessed (e.g. Internet connectivity issue).
Updated: I know I could write an NPAPI plugin accessible through an extension to accomplish this but I'd rather not suffer writing one... I am after a solution without resorting to NPAPI, please.
Note: as far as I can tell, Google Chrome doesn't support this functionality (at least not out-of-the-box): I just had an episode of "no Internet access" and I was stranded...
Unfortunately, I'm 99% sure that this is impossible without using an NPAPI in your extension.
Chrome extensions are sandboxed to their own process, and can only access files within the extension's folder.
There is some support for things like chrome://favicon/. But that's about it, at least for now.
Source (Google Chrome Extensions Reference)
P.S. I just had a crazy idea. Extensions only have access to files in their folder... but Chrome stores it's cache in the Cache folder. What you might try is, copy (or move) the Cache folder into a subfolder within the extension. The extension should now be able to access the cache.
Whether this is enough to actually enable offline mode... I don't know. I do see some HTML files (and obviously a lot of images) within my Cache folder, though.
In fact, even without using an extension, I can open up the HTML files in Chrome. And because they're stored on your computer, you should be able to access them even without internet.
P.S. the Cache folder is stored at PATH-TO-CHROME/Default/Cache
P.P.S. there is a way to store an entire webpage and archive it for later use. Check out this extension:
https://chrome.google.com/extensions/detail/mpiodijhokgodhhofbcjdecpffjipkle
Just make a simple plugin manifest that calls an AJAX page which loads jQuery from CDN, and then uses it to parse all the <a> elements on the page and alter the href values to have this prefix: http://webcache.googleusercontent.com/search?q=cache:
So <a href="http://stackoverflow.com/questions/blah"> becomes:
<a href="http://webcache.googleusercontent.com/search?q=cache:http://stackoverflow.com/questions/blah">
Voilà, you are cache surfing, but you still need to get to Google. I understand this answer is a bit outside the scope of the question but still solves a lot of web connectivity issues.
I'm tempted to just go write this plugin but I bet it'd be taboo in Google's eyes, so it'd get blocked or removed rather quickly. :)