Preload Highlight.js on Diff Page

Change-Id: I391b56d02aaf87fa82a97cb0565f51dc725e6cf1
This commit is contained in:
Milutin Kristofic
2020-07-14 15:36:12 +02:00
parent f002659b3c
commit 9d65b0b8b0
2 changed files with 2 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mix
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {htmlTemplate} from './gr-lib-loader_html.js';
// preloaded in PolyGerritIndexHtml.soy
const HLJS_PATH = 'bower_components/highlightjs/highlight.min.js';
/** @extends PolymerElement */

View File

@@ -102,6 +102,7 @@
{if $userIsAuthenticated}
<link rel="preload" href="{$canonicalPath}/{$changeRequestsPath}/drafts" as="fetch" type="application/json" crossorigin="anonymous"/>{\n}
{/if}
<link rel="preload" href="{$staticResourcePath}/bower_components/highlightjs/highlight.min.js" as="script"/>
{/if}
{if $useGoogleFonts}