Skip to content

Commit

Permalink
static/frontend: use single quotes for strings
Browse files Browse the repository at this point in the history
As a fixup for CL 574655, fix two problems that the devtools/ci/ci.sh
script reports under the 'Running CSS/JS linters' section:

	/pkgsite/static/frontend/frontend.ts
	  131:68  error  Replace `".go.dev"` with `'.go.dev'`  prettier/prettier
	  150:72  error  Replace `".go.dev"` with `'.go.dev'`  prettier/prettier

	✖ 2 problems (2 errors, 0 warnings)

Change-Id: I37baeca0d969bb1100dc49d8b5d8473bb3c13df0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/579338
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
dmitshur authored and gopherbot committed Apr 16, 2024
1 parent 493d85e commit 12f7c87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/frontend/frontend.ts
Expand Up @@ -128,7 +128,7 @@ function toggleTheme() {
nextTheme = 'auto';
}
let domain = '';
if (location.hostname === 'go.dev' || location.hostname.endsWith(".go.dev")) {
if (location.hostname === 'go.dev' || location.hostname.endsWith('.go.dev')) {
domain = 'domain=.go.dev;';
}
document.documentElement.setAttribute('data-theme', nextTheme);
Expand All @@ -147,7 +147,7 @@ function registerCookieNotice() {
notice?.classList.add('Cookie-notice--visible');
button?.addEventListener('click', () => {
let domain = '';
if (location.hostname === 'go.dev' || location.hostname.endsWith(".go.dev")) {
if (location.hostname === 'go.dev' || location.hostname.endsWith('.go.dev')) {
// Apply the cookie to *.go.dev.
domain = 'domain=.go.dev;';
}
Expand Down

0 comments on commit 12f7c87

Please sign in to comment.