Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Change inclusions of server-generated scripts to use staticLink
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Oct 19, 2016
1 parent 452a110 commit b068b1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/src/pages/homepage/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Head extends React.Component {
<meta name="viewport" content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="description" content="Share anything on the web with anyone using Page Shot." />
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css" />
<link href="/homepage/css/style.css" rel="stylesheet" />
<link href={this.props.staticLink("/homepage/css/style.css")} rel="stylesheet" />
<meta name="description" content="Intuitive screenshots baked right into the browser. Capture, save and share screenshots as you browse the Web using Firefox." />
<meta property="og:title" content={ this.props.title } />
<meta property="og:url" content={ this.props.backend } />
Expand Down
4 changes: 2 additions & 2 deletions server/src/reactruntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ exports.HeadTemplate = class HeadTemplate extends React.Component {
<link rel="icon" type="image/png" href={this.props.staticLink("/static/img/pageshot-icon-32.png")} />
<link rel="shortcut icon" href={this.props.staticLink("/static/img/pageshot-icon-32.png")} />
{ this.props.noAnalytics ? null : <script src="//www.google-analytics.com/analytics.js" async /> }
{ this.props.noAnalytics ? null : <script src="/ga-activation.js" /> }
{ this.props.noAnalytics ? null : <script src={this.props.staticLink("/ga-activation.js")} /> }
{ this.props.sentryPublicDSN ? <script src={ this.props.staticLink("/static/vendor/raven.js") } /> : null }
{ this.props.sentryPublicDSN ? <script src="/configure-raven.js" /> : null }
{ this.props.sentryPublicDSN ? <script src={this.props.staticLink("/configure-raven.js")} /> : null }
{this.props.children}
</head>
);
Expand Down
6 changes: 3 additions & 3 deletions server/src/views/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,14 @@ class Head extends React.Component {
}
let js = [
<script src="//www.google-analytics.com/analytics.js" async key="gaScript" />,
<script src="/ga-activation-hashed.js" key="gaActivation" />,
<script src={this.props.staticLink("/ga-activation-hashed.js")} key="gaActivation" />,
<script src={ this.props.staticLink("/static/js/server-bundle.js") } key="server-bundle-js" />,
];

if (this.props.sentryPublicDSN) {
js = js.concat([
<script src={ this.props.staticLink("/static/vendor/raven.js") } key="raven-js-js" />,
<script src="/configure-raven.js" key="configure-raven" />
<script src={ this.props.staticLink("/configure-raven.js") } key="configure-raven" />
]);
}
if (this.props.simple) {
Expand All @@ -288,7 +288,7 @@ class Head extends React.Component {
<meta name="viewport" content="width=device-width, initial-scale=1" />
{oembed}
{this.socialMetadata()}
<script src="/set-content-hosting-origin.js" />
<script src={ this.props.staticLink("/set-content-hosting-origin.js") } />
<script src={ this.props.staticLink("/static/js/parent-helper.js") } />
</head>);
}
Expand Down

0 comments on commit b068b1b

Please sign in to comment.