From 517cf1093ed2c331efff9a522bd6e7eb109f58b2 Mon Sep 17 00:00:00 2001 From: Oliver Dunk Date: Thu, 10 Jul 2025 14:31:51 +0100 Subject: [PATCH] Move sw-tips tutorial to use chrome.dev (#1505) Moves from the Glitch URL to chrome.dev, and removes the host permissions as we now set CORS headers. --- functional-samples/tutorial.quick-api-reference/manifest.json | 1 - functional-samples/tutorial.quick-api-reference/sw-tips.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/functional-samples/tutorial.quick-api-reference/manifest.json b/functional-samples/tutorial.quick-api-reference/manifest.json index 4e8ed8e1..3ebe002d 100644 --- a/functional-samples/tutorial.quick-api-reference/manifest.json +++ b/functional-samples/tutorial.quick-api-reference/manifest.json @@ -16,7 +16,6 @@ "keyword": "api" }, "permissions": ["alarms", "storage"], - "host_permissions": ["https://extension-tips.glitch.me/*"], "content_scripts": [ { "matches": ["https://developer.chrome.com/docs/extensions/reference/*"], diff --git a/functional-samples/tutorial.quick-api-reference/sw-tips.js b/functional-samples/tutorial.quick-api-reference/sw-tips.js index d6400434..ee8ceba5 100644 --- a/functional-samples/tutorial.quick-api-reference/sw-tips.js +++ b/functional-samples/tutorial.quick-api-reference/sw-tips.js @@ -2,7 +2,7 @@ console.log('sw-tips.js'); // Fetch tip & save in storage const updateTip = async () => { - const response = await fetch('https://extension-tips.glitch.me/tips.json'); + const response = await fetch('https://chrome.dev/f/extension_tips/'); const tips = await response.json(); const randomIndex = Math.floor(Math.random() * tips.length); return chrome.storage.local.set({ tip: tips[randomIndex] });