static/frontend: use single quotes for strings
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>
diff --git a/static/frontend/frontend.ts b/static/frontend/frontend.ts
index 26cceff..5a3a275 100644
--- a/static/frontend/frontend.ts
+++ b/static/frontend/frontend.ts
@@ -128,7 +128,7 @@
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);
@@ -147,7 +147,7 @@
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;';
}