)
diff --git a/javascripts/copy-code.ts b/javascripts/copy-code.ts
index 709573bb1183..8b0f3793c13a 100644
--- a/javascripts/copy-code.ts
+++ b/javascripts/copy-code.ts
@@ -1,4 +1,4 @@
-export default () => {
+export default function copyCode() {
const buttons = Array.from(document.querySelectorAll('button.js-btn-copy'))
if (!buttons) return
diff --git a/javascripts/experiment.ts b/javascripts/experiment.ts
index dd0228e76e60..664c26e1c8cd 100644
--- a/javascripts/experiment.ts
+++ b/javascripts/experiment.ts
@@ -1,6 +1,5 @@
import murmur from 'imurmurhash'
import { getUserEventsId, sendEvent, EventType } from './events'
-// import h from './hyperscript'
const TREATMENT = 'TREATMENT'
const CONTROL = 'CONTROL'
diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json
index 978ce27b4f5a..55e1d167f18f 100644
--- a/lib/rest/static/decorated/api.github.com.json
+++ b/lib/rest/static/decorated/api.github.com.json
@@ -73497,12 +73497,12 @@
{
"name": "secret_types",
"in": "query",
- "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
"required": false,
"schema": {
"type": "string"
},
- "descriptionHTML": "
Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to all to list all the secret scanning alerts. Default is all
"
+ "descriptionHTML": "
Set to a comma separated list of secret_type in order to only list secret scanning alerts for those types. Set to all to list all the secret scanning alerts. Default is all.
"
},
{
"name": "page",
diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json
index ec9ea5b76ab3..0331f1470384 100644
--- a/lib/rest/static/decorated/ghes-3.1.json
+++ b/lib/rest/static/decorated/ghes-3.1.json
@@ -71288,12 +71288,12 @@
{
"name": "secret_types",
"in": "query",
- "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
"required": false,
"schema": {
"type": "string"
},
- "descriptionHTML": "
Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to all to list all the secret scanning alerts. Default is all
"
+ "descriptionHTML": "
Set to a comma separated list of secret_type in order to only list secret scanning alerts for those types. Set to all to list all the secret scanning alerts. Default is all.
"
},
{
"name": "page",
diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json
index 2d02990a8dde..abb94a8099c8 100644
--- a/lib/rest/static/dereferenced/api.github.com.deref.json
+++ b/lib/rest/static/dereferenced/api.github.com.deref.json
@@ -323446,7 +323446,7 @@
{
"name": "secret_types",
"in": "query",
- "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
"required": false,
"schema": {
"type": "string"
diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json
index 735f3f270f57..20264f16b6e0 100644
--- a/lib/rest/static/dereferenced/ghes-3.1.deref.json
+++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json
@@ -307190,7 +307190,7 @@
{
"name": "secret_types",
"in": "query",
- "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
"required": false,
"schema": {
"type": "string"
diff --git a/pages/[versionId]/[productId]/index.tsx b/pages/[versionId]/[productId]/index.tsx
index 8a1a9e853ebb..fa9b35a69667 100644
--- a/pages/[versionId]/[productId]/index.tsx
+++ b/pages/[versionId]/[productId]/index.tsx
@@ -1,5 +1,14 @@
import { GetServerSideProps } from 'next'
+// "legacy" javascript needed to maintain existing functionality
+// typically operating on elements **within** an article.
+import copyCode from 'javascripts/copy-code'
+import displayPlatformSpecificContent from 'javascripts/display-platform-specific-content'
+import displayToolSpecificContent from 'javascripts/display-tool-specific-content'
+import localization from 'javascripts/localization'
+import toggleImages from 'javascripts/toggle-images'
+import wrapCodeTerms from 'javascripts/wrap-code-terms'
+
import {
MainContextT,
MainContext,
@@ -32,6 +41,7 @@ import {
TocLandingContext,
TocLandingContextT,
} from 'components/context/TocLandingContext'
+import { useEffect } from 'react'
type Props = {
mainContext: MainContextT
@@ -49,6 +59,15 @@ const GlobalPage = ({
}: Props) => {
const { currentLayoutName, relativePath } = mainContext
+ useEffect(() => {
+ copyCode()
+ displayPlatformSpecificContent()
+ displayToolSpecificContent()
+ localization()
+ toggleImages()
+ wrapCodeTerms()
+ }, [])
+
let content
if (currentLayoutName === 'product-landing') {
content = (
diff --git a/pages/[versionId]/graphql/overview/explorer.tsx b/pages/[versionId]/graphql/overview/explorer.tsx
index e25d23d2cc56..11fd22b0f25d 100644
--- a/pages/[versionId]/graphql/overview/explorer.tsx
+++ b/pages/[versionId]/graphql/overview/explorer.tsx
@@ -7,6 +7,7 @@ import {
} from 'components/context/MainContext'
import { Breadcrumbs } from 'components/Breadcrumbs'
import { DefaultLayout } from 'components/DefaultLayout'
+import { useEffect, useRef } from 'react'
type Props = {
mainContext: MainContextT
@@ -14,6 +15,14 @@ type Props = {
}
export default function GQLExplorer({ mainContext, graphqlExplorerUrl }: Props) {
const { page, airGap } = mainContext
+ const graphiqlRef = useRef(null)
+
+ useEffect(() => {
+ if (typeof window !== 'undefined' && window.location.search) {
+ graphiqlRef.current?.contentWindow?.postMessage(window.location.search, graphqlExplorerUrl)
+ }
+ }, [])
+
return (
@@ -33,12 +42,7 @@ export default function GQLExplorer({ mainContext, graphqlExplorerUrl }: Props)
GraphQL explorer is not available on this environment.