Preload Highlight.js on Diff Page
Change-Id: I391b56d02aaf87fa82a97cb0565f51dc725e6cf1
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user