-1

I'm now working on a chrome extension.I'm interested in how google translate extension parse the html document.So I tried to find the sourcecode according to How to View the Source Code of a Chrome Extension,but I can't get the ID of google translate extension.So how can I view the source code? Thanks!

yaoweiprc
  • 1
  • 3

1 Answers1

2

I don't quite understand the problem.

A quick Google for "google translate chrome" search finds the extension in the Web Store with the ID aapbdbdomjkkjkaonfhkkikfgjllcleb

And I can verify that CRX Viewer can show you the contents of the extension.

However, it will be of little use to you, since the published version has the source compiled (presumably by Closure Compiler), and as such it is obfuscated:

/*... just a sample ...*/
    Ua = function(a) {
        var b = [],
            c = 0,
            d;
        for (d in a) b[c++] = a[d];
        return b
    },
    Va = function(a) {
        var b = [],
            c = 0,
            d;
        for (d in a) b[c++] = d;
        return b
    },
/*...*/

It's unlikely you will learn much by inspecting machine-generated code.

Xan
  • 74,770
  • 16
  • 179
  • 206