diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py')
-rwxr-xr-x[-rw-r--r--] | chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py b/chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py index a5cf3abc697..9a67228a657 100644..100755 --- a/chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py +++ b/chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py @@ -34,27 +34,23 @@ import sys def generate_include_tag(resource_path): - (dir_name, file_name) = os.path.split(resource_path) - if (file_name.endswith('.js')): - return ' <script type="text/javascript" src="%s"></script>\n' % file_name - elif (file_name.endswith('.css')): - return ' <link rel="stylesheet" type="text/css" href="%s">\n' % file_name + if (resource_path.endswith('.js')): + return ' <script type="text/javascript" src="%s"></script>\n' % resource_path + elif (resource_path.endswith('.css')): + return ' <link rel="stylesheet" type="text/css" href="%s">\n' % resource_path else: assert resource_path def write_devtools_html(inspector_file, devtools_file, debug): for line in inspector_file: - if not debug and '<script ' in line: - continue - if not debug and '<link ' in line: - continue - if '</head>' in line and not debug: - devtools_file.write(generate_include_tag("inspector.css")) - devtools_file.write(generate_include_tag("inspector.js")) + if not debug: + if '<script ' in line or '<link ' in line: + continue + if '</head>' in line: + devtools_file.write(generate_include_tag("inspector.css")) + devtools_file.write(generate_include_tag("main/Main.js")) devtools_file.write(line) - if '<head>' in line: - devtools_file.write(generate_include_tag("buildSystemOnly.js")) def main(argv): |