简体   繁体   English

有没有办法在代码上反转Closure Compiler(或类似代码)的效果?

[英]Is there any way to reverse the effects Closure Compiler (or the like) on code?

I just recently took over a project because my clients previous web dev disappeared. 我刚刚接手了一个项目,因为我的客户以前的网络开发消失了。 The only files I have to work with are what is stored on the local server. 我必须使用的唯一文件是存储在本地服务器上的文件。 The only problem I've encountered is all of the JS has been run through Closure Compiler (or something of the like) which makes the javascript really annoying to read (at least for the bigger functions). 我遇到的唯一问题是所有的JS都已经通过Closure Compiler(或类似的东西)运行,这使得javascript真的很烦人阅读(至少对于更大的功能)。 Is there anything out there that would help me replug vars in JS so I have something cleaner to look at? 有没有什么可以帮助我重新插入JS中的变量,所以我有一些更清洁的东西看? I've been doing it by hand and it's getting quite tedious. 我一直在手工做,而且变得相当乏味。

Here's an example of what I'm dealing with: 这是我正在处理的一个例子:

    var n = {},
        e = a.extend(n, x),
        y = "pageLoaded",
        u = "pageLoading",
        c = "modLoaded",
        w = "xhrComplete",
        l = true,
        v = false,
        s = a("body"),
        g = Modernizr.historymanagement,
        f = "",
        t = "",
        r = "",
        k = null,
        b = window.History;

Thanks ahead of time! 提前谢谢!

Tre TRE

No. It's munged. 不,它已经被淘汰了。 To a certain degree you can replace tokens when literals are assigned - you could, for example, replace all instances of l with true and v with false in the code. 在某种程度上,您可以在分配文字时替换标记 - 例如,您可以在代码中将所有l实例替换为true ,将v替换为false But there are other things which it does that would be a lot more complex to reverse and I don't believe anyone's put much effort into it. 但是还有其他一些事情要做的事情要扭转得更复杂,我不相信任何人都会付出太多努力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM