@apify/docs-theme 1.0.199 → 1.0.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/custom.js +21 -0
package/package.json
CHANGED
package/static/js/custom.js
CHANGED
|
@@ -125,9 +125,30 @@ window.addEventListener('load', () => {
|
|
|
125
125
|
|
|
126
126
|
// docusaurus-openapi-docs plugin: scroll sidebar into viewport, no need for a large timeout here
|
|
127
127
|
setTimeout(() => scrollOpenApiSidebarItemIntoView(), 200);
|
|
128
|
+
|
|
129
|
+
// MCP cache clearing - run after page is fully loaded
|
|
130
|
+
setTimeout(() => clearMcpRedirectCache(), 200);
|
|
128
131
|
});
|
|
129
132
|
|
|
130
133
|
window.addEventListener('popstate', () => {
|
|
131
134
|
setTimeout(() => redirectOpenApiDocs(), 50);
|
|
132
135
|
setTimeout(() => scrollOpenApiSidebarItemIntoView(), 50);
|
|
133
136
|
});
|
|
137
|
+
|
|
138
|
+
// MCP redirect cache-busting
|
|
139
|
+
// Background: Previously, mcp.apify.com had a 301 redirect to the docs page
|
|
140
|
+
// This clears cached redirects so users can access the new MCP configuration interface
|
|
141
|
+
function clearMcpRedirectCache() {
|
|
142
|
+
// Only run on the MCP documentation page
|
|
143
|
+
if (window.location.pathname.includes('integrations/mcp')) {
|
|
144
|
+
// Clear cached redirects to mcp.apify.com
|
|
145
|
+
fetch('https://mcp.apify.com/', {
|
|
146
|
+
method: 'get',
|
|
147
|
+
cache: 'reload',
|
|
148
|
+
}).then(() => {
|
|
149
|
+
// Cache cleared successfully
|
|
150
|
+
}).catch(() => {
|
|
151
|
+
// Failed to clear cache - silent fail
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|