@gxp-dev/tools 2.0.63 → 2.0.64

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.
Files changed (182) hide show
  1. package/README.md +32 -31
  2. package/bin/gx-devtools.js +74 -54
  3. package/bin/lib/cli.js +23 -21
  4. package/bin/lib/commands/add-dependency.js +366 -325
  5. package/bin/lib/commands/assets.js +137 -139
  6. package/bin/lib/commands/build.js +169 -174
  7. package/bin/lib/commands/datastore.js +181 -183
  8. package/bin/lib/commands/dev.js +127 -131
  9. package/bin/lib/commands/extensions.js +147 -149
  10. package/bin/lib/commands/extract-config.js +73 -67
  11. package/bin/lib/commands/index.js +12 -12
  12. package/bin/lib/commands/init.js +342 -240
  13. package/bin/lib/commands/publish.js +69 -75
  14. package/bin/lib/commands/socket.js +69 -69
  15. package/bin/lib/commands/ssl.js +14 -14
  16. package/bin/lib/constants.js +10 -24
  17. package/bin/lib/tui/App.tsx +761 -705
  18. package/bin/lib/tui/components/AIPanel.tsx +191 -171
  19. package/bin/lib/tui/components/CommandInput.tsx +394 -343
  20. package/bin/lib/tui/components/GeminiPanel.tsx +175 -151
  21. package/bin/lib/tui/components/Header.tsx +23 -21
  22. package/bin/lib/tui/components/LogPanel.tsx +244 -220
  23. package/bin/lib/tui/components/TabBar.tsx +50 -48
  24. package/bin/lib/tui/components/WelcomeScreen.tsx +126 -71
  25. package/bin/lib/tui/index.tsx +37 -39
  26. package/bin/lib/tui/services/AIService.ts +518 -462
  27. package/bin/lib/tui/services/ExtensionService.ts +140 -129
  28. package/bin/lib/tui/services/GeminiService.ts +367 -337
  29. package/bin/lib/tui/services/ServiceManager.ts +344 -322
  30. package/bin/lib/tui/services/SocketService.ts +168 -168
  31. package/bin/lib/tui/services/ViteService.ts +88 -88
  32. package/bin/lib/tui/services/index.ts +47 -22
  33. package/bin/lib/utils/ai-scaffold.js +291 -280
  34. package/bin/lib/utils/extract-config.js +157 -140
  35. package/bin/lib/utils/files.js +82 -86
  36. package/bin/lib/utils/index.js +7 -7
  37. package/bin/lib/utils/paths.js +34 -34
  38. package/bin/lib/utils/prompts.js +194 -169
  39. package/bin/lib/utils/ssl.js +79 -81
  40. package/browser-extensions/README.md +0 -1
  41. package/browser-extensions/chrome/background.js +244 -237
  42. package/browser-extensions/chrome/content.js +32 -29
  43. package/browser-extensions/chrome/devtools.html +7 -7
  44. package/browser-extensions/chrome/devtools.js +19 -19
  45. package/browser-extensions/chrome/inspector.js +802 -767
  46. package/browser-extensions/chrome/manifest.json +71 -63
  47. package/browser-extensions/chrome/panel.html +674 -636
  48. package/browser-extensions/chrome/panel.js +722 -712
  49. package/browser-extensions/chrome/popup.html +586 -543
  50. package/browser-extensions/chrome/popup.js +282 -244
  51. package/browser-extensions/chrome/rules.json +1 -1
  52. package/browser-extensions/chrome/test-chrome.html +216 -136
  53. package/browser-extensions/chrome/test-mixed-content.html +284 -189
  54. package/browser-extensions/chrome/test-uri-pattern.html +221 -198
  55. package/browser-extensions/firefox/README.md +9 -6
  56. package/browser-extensions/firefox/background.js +221 -218
  57. package/browser-extensions/firefox/content.js +55 -52
  58. package/browser-extensions/firefox/debug-errors.html +386 -228
  59. package/browser-extensions/firefox/debug-https.html +153 -105
  60. package/browser-extensions/firefox/devtools.html +7 -7
  61. package/browser-extensions/firefox/devtools.js +23 -20
  62. package/browser-extensions/firefox/inspector.js +802 -767
  63. package/browser-extensions/firefox/manifest.json +68 -68
  64. package/browser-extensions/firefox/panel.html +674 -636
  65. package/browser-extensions/firefox/panel.js +722 -712
  66. package/browser-extensions/firefox/popup.html +572 -535
  67. package/browser-extensions/firefox/popup.js +281 -236
  68. package/browser-extensions/firefox/test-gramercy.html +170 -125
  69. package/browser-extensions/firefox/test-imports.html +59 -55
  70. package/browser-extensions/firefox/test-masking.html +231 -140
  71. package/browser-extensions/firefox/test-uri-pattern.html +221 -198
  72. package/dist/tui/App.d.ts +1 -1
  73. package/dist/tui/App.d.ts.map +1 -1
  74. package/dist/tui/App.js +154 -150
  75. package/dist/tui/App.js.map +1 -1
  76. package/dist/tui/components/AIPanel.d.ts.map +1 -1
  77. package/dist/tui/components/AIPanel.js +42 -35
  78. package/dist/tui/components/AIPanel.js.map +1 -1
  79. package/dist/tui/components/CommandInput.d.ts +1 -1
  80. package/dist/tui/components/CommandInput.d.ts.map +1 -1
  81. package/dist/tui/components/CommandInput.js +92 -62
  82. package/dist/tui/components/CommandInput.js.map +1 -1
  83. package/dist/tui/components/GeminiPanel.d.ts.map +1 -1
  84. package/dist/tui/components/GeminiPanel.js +37 -30
  85. package/dist/tui/components/GeminiPanel.js.map +1 -1
  86. package/dist/tui/components/Header.d.ts.map +1 -1
  87. package/dist/tui/components/Header.js +1 -1
  88. package/dist/tui/components/Header.js.map +1 -1
  89. package/dist/tui/components/LogPanel.d.ts +1 -1
  90. package/dist/tui/components/LogPanel.d.ts.map +1 -1
  91. package/dist/tui/components/LogPanel.js +26 -24
  92. package/dist/tui/components/LogPanel.js.map +1 -1
  93. package/dist/tui/components/TabBar.d.ts +2 -2
  94. package/dist/tui/components/TabBar.d.ts.map +1 -1
  95. package/dist/tui/components/TabBar.js +11 -11
  96. package/dist/tui/components/TabBar.js.map +1 -1
  97. package/dist/tui/components/WelcomeScreen.d.ts.map +1 -1
  98. package/dist/tui/components/WelcomeScreen.js +6 -6
  99. package/dist/tui/components/WelcomeScreen.js.map +1 -1
  100. package/dist/tui/index.d.ts.map +1 -1
  101. package/dist/tui/index.js +8 -8
  102. package/dist/tui/index.js.map +1 -1
  103. package/dist/tui/services/AIService.d.ts +2 -2
  104. package/dist/tui/services/AIService.d.ts.map +1 -1
  105. package/dist/tui/services/AIService.js +165 -125
  106. package/dist/tui/services/AIService.js.map +1 -1
  107. package/dist/tui/services/ExtensionService.d.ts +1 -1
  108. package/dist/tui/services/ExtensionService.d.ts.map +1 -1
  109. package/dist/tui/services/ExtensionService.js +33 -26
  110. package/dist/tui/services/ExtensionService.js.map +1 -1
  111. package/dist/tui/services/GeminiService.d.ts +1 -1
  112. package/dist/tui/services/GeminiService.d.ts.map +1 -1
  113. package/dist/tui/services/GeminiService.js +87 -76
  114. package/dist/tui/services/GeminiService.js.map +1 -1
  115. package/dist/tui/services/ServiceManager.d.ts +3 -3
  116. package/dist/tui/services/ServiceManager.d.ts.map +1 -1
  117. package/dist/tui/services/ServiceManager.js +72 -58
  118. package/dist/tui/services/ServiceManager.js.map +1 -1
  119. package/dist/tui/services/SocketService.d.ts.map +1 -1
  120. package/dist/tui/services/SocketService.js +32 -32
  121. package/dist/tui/services/SocketService.js.map +1 -1
  122. package/dist/tui/services/ViteService.d.ts.map +1 -1
  123. package/dist/tui/services/ViteService.js +26 -28
  124. package/dist/tui/services/ViteService.js.map +1 -1
  125. package/dist/tui/services/index.d.ts +6 -6
  126. package/dist/tui/services/index.d.ts.map +1 -1
  127. package/dist/tui/services/index.js +6 -6
  128. package/dist/tui/services/index.js.map +1 -1
  129. package/mcp/gxp-api-server.js +83 -81
  130. package/package.json +109 -93
  131. package/runtime/PortalContainer.vue +258 -234
  132. package/runtime/dev-tools/DevToolsModal.vue +153 -155
  133. package/runtime/dev-tools/LayoutSwitcher.vue +144 -140
  134. package/runtime/dev-tools/MockDataEditor.vue +456 -433
  135. package/runtime/dev-tools/SocketSimulator.vue +379 -371
  136. package/runtime/dev-tools/StoreInspector.vue +517 -455
  137. package/runtime/dev-tools/index.js +5 -5
  138. package/runtime/fallback-layouts/PrivateLayout.vue +2 -2
  139. package/runtime/fallback-layouts/PublicLayout.vue +2 -2
  140. package/runtime/fallback-layouts/SystemLayout.vue +2 -2
  141. package/runtime/gxpStringsPlugin.js +159 -134
  142. package/runtime/index.html +17 -19
  143. package/runtime/main.js +24 -22
  144. package/runtime/mock-api/auth-middleware.js +15 -15
  145. package/runtime/mock-api/image-generator.js +46 -46
  146. package/runtime/mock-api/index.js +55 -55
  147. package/runtime/mock-api/response-generator.js +116 -105
  148. package/runtime/mock-api/route-generator.js +107 -84
  149. package/runtime/mock-api/socket-triggers.js +94 -93
  150. package/runtime/mock-api/spec-loader.js +79 -80
  151. package/runtime/package.json +3 -0
  152. package/runtime/server.js +68 -68
  153. package/runtime/stores/gxpPortalConfigStore.js +204 -186
  154. package/runtime/stores/index.js +2 -2
  155. package/runtime/vite-inspector-plugin.js +858 -707
  156. package/runtime/vite-source-tracker-plugin.js +132 -113
  157. package/runtime/vite.config.js +191 -139
  158. package/scripts/launch-chrome.js +41 -41
  159. package/scripts/pack-chrome.js +38 -39
  160. package/socket-events/AiSessionMessageCreated.json +17 -17
  161. package/socket-events/SocialStreamPostCreated.json +23 -23
  162. package/socket-events/SocialStreamPostVariantCompleted.json +22 -22
  163. package/template/.claude/agents/gxp-developer.md +100 -99
  164. package/template/.claude/settings.json +7 -7
  165. package/template/AGENTS.md +30 -23
  166. package/template/GEMINI.md +20 -20
  167. package/template/README.md +70 -53
  168. package/template/app-manifest.json +2 -4
  169. package/template/configuration.json +10 -10
  170. package/template/default-styling.css +1 -1
  171. package/template/index.html +18 -20
  172. package/template/main.js +24 -22
  173. package/template/src/DemoPage.vue +415 -362
  174. package/template/src/Plugin.vue +76 -85
  175. package/template/src/stores/index.js +3 -3
  176. package/template/src/stores/test-data.json +164 -172
  177. package/template/theme-layouts/AdditionalStyling.css +50 -50
  178. package/template/theme-layouts/PrivateLayout.vue +8 -12
  179. package/template/theme-layouts/PublicLayout.vue +8 -12
  180. package/template/theme-layouts/SystemLayout.vue +8 -12
  181. package/template/vite.extend.js +45 -0
  182. package/template/vite.config.js +0 -409
@@ -1,199 +1,222 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>JavaScript Proxy URI Pattern Test</title>
7
- <style>
8
- body {
9
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
10
- max-width: 800px;
11
- margin: 0 auto;
12
- padding: 20px;
13
- background: #f8f9fa;
14
- }
15
- .container {
16
- background: white;
17
- padding: 30px;
18
- border-radius: 8px;
19
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
20
- }
21
- h1 {
22
- color: #333;
23
- margin-bottom: 30px;
24
- }
25
- .test-section {
26
- margin-bottom: 30px;
27
- padding: 20px;
28
- border: 1px solid #e9ecef;
29
- border-radius: 6px;
30
- }
31
- .test-section h3 {
32
- margin-top: 0;
33
- color: #495057;
34
- }
35
- .url-test {
36
- margin: 10px 0;
37
- padding: 10px;
38
- background: #f8f9fa;
39
- border-left: 4px solid #007bff;
40
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
41
- font-size: 13px;
42
- word-break: break-all;
43
- }
44
- .should-match {
45
- border-left-color: #28a745;
46
- }
47
- .should-not-match {
48
- border-left-color: #dc3545;
49
- }
50
- button {
51
- background: #007bff;
52
- color: white;
53
- border: none;
54
- padding: 10px 20px;
55
- border-radius: 4px;
56
- cursor: pointer;
57
- margin: 5px;
58
- }
59
- button:hover {
60
- background: #0056b3;
61
- }
62
- .status {
63
- margin-top: 20px;
64
- padding: 15px;
65
- border-radius: 4px;
66
- font-weight: bold;
67
- }
68
- .success {
69
- background: #d4edda;
70
- color: #155724;
71
- border: 1px solid #c3e6cb;
72
- }
73
- .error {
74
- background: #f8d7da;
75
- color: #721c24;
76
- border: 1px solid #f5c6cb;
77
- }
78
- </style>
79
- </head>
80
- <body>
81
- <div class="container">
82
- <h1>JavaScript Proxy URI Pattern Test</h1>
83
-
84
- <div class="test-section">
85
- <h3>Default Pattern</h3>
86
- <p>Default pattern: <code>uploads\/plugin-version\/\d+\/file_name\/.*\.js(\?.*)?</code></p>
87
- <p>This should match JavaScript files in the uploads/plugin-version/* path on any domain.</p>
88
- </div>
89
-
90
- <div class="test-section">
91
- <h3>URLs That Should Match (Will Redirect)</h3>
92
-
93
- <div class="url-test should-match">
94
- https://example.com/uploads/plugin-version/123/file_name/script.js
95
- </div>
96
-
97
- <div class="url-test should-match">
98
- https://westernightwall.zenith-develop.env.eventfinity.app/uploads/plugin-version/3/file_name/T9OvqS1727804478.js
99
- </div>
100
-
101
- <div class="url-test should-match">
102
- https://different-domain.com/uploads/plugin-version/456/file_name/myfile.js?signature=abc123&expires=789
103
- </div>
104
-
105
- <div class="url-test should-match">
106
- https://api.staging.example.org/uploads/plugin-version/999/file_name/component.js?token=xyz
107
- </div>
108
- </div>
109
-
110
- <div class="test-section">
111
- <h3>URLs That Should NOT Match (No Redirect)</h3>
112
-
113
- <div class="url-test should-not-match">
114
- https://example.com/uploads/versions/123/file_name/script.js
115
- <small>(different path: versions instead of plugin-version)</small>
116
- </div>
117
-
118
- <div class="url-test should-not-match">
119
- https://example.com/uploads/plugin-version/123/file_name/style.css
120
- <small>(not a .js file)</small>
121
- </div>
122
-
123
- <div class="url-test should-not-match">
124
- https://example.com/other-path/plugin-version/123/file_name/script.js
125
- <small>(wrong base path)</small>
126
- </div>
127
-
128
- <div class="url-test should-not-match">
129
- https://localhost:3060/src/Plugin.vue
130
- <small>(localhost - prevent redirect loops)</small>
131
- </div>
132
- </div>
133
-
134
- <div class="test-section">
135
- <h3>Test Actions</h3>
136
- <p>Click the buttons below to test loading JavaScript files:</p>
137
-
138
- <button onclick="testUrl('https://example.com/uploads/plugin-version/123/file_name/test.js')">
139
- Test Matching URL
140
- </button>
141
-
142
- <button onclick="testUrl('https://example.com/uploads/plugin-version/456/file_name/test.js?signed=true')">
143
- Test Matching URL with Query
144
- </button>
145
-
146
- <button onclick="testUrl('https://example.com/other-path/test.js')">
147
- Test Non-Matching URL
148
- </button>
149
-
150
- <div id="status"></div>
151
- </div>
152
-
153
- <div class="test-section">
154
- <h3>Instructions</h3>
155
- <ol>
156
- <li>Install and enable the JavaScript Proxy extension</li>
157
- <li>Configure it to redirect to your local development server</li>
158
- <li>Open browser developer tools to see network requests</li>
159
- <li>Click the test buttons above to see which URLs get redirected</li>
160
- <li>URLs matching the pattern should redirect to your local server</li>
161
- <li>URLs not matching should load normally (and probably fail)</li>
162
- </ol>
163
- </div>
164
- </div>
165
-
166
- <script>
167
- function testUrl(url) {
168
- const status = document.getElementById('status');
169
- status.innerHTML = `<div class="status">Testing: ${url}</div>`;
170
-
171
- // Create a script element to test the URL
172
- const script = document.createElement('script');
173
- script.src = url;
174
-
175
- script.onload = function() {
176
- status.innerHTML = `<div class="status success">✅ Successfully loaded: ${url}</div>`;
177
- };
178
-
179
- script.onerror = function() {
180
- status.innerHTML = `<div class="status error">❌ Failed to load: ${url}<br><small>This is expected for test URLs that don't exist</small></div>`;
181
- };
182
-
183
- // Add to page to trigger the request
184
- document.head.appendChild(script);
185
-
186
- // Remove after a short delay
187
- setTimeout(() => {
188
- if (script.parentNode) {
189
- script.parentNode.removeChild(script);
190
- }
191
- }, 5000);
192
- }
193
-
194
- // Log current page URL for reference
195
- console.log('Test page URL:', window.location.href);
196
- console.log('Use browser dev tools to monitor network requests and see proxy behavior');
197
- </script>
198
- </body>
199
- </html>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>JavaScript Proxy URI Pattern Test</title>
7
+ <style>
8
+ body {
9
+ font-family:
10
+ -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
11
+ max-width: 800px;
12
+ margin: 0 auto;
13
+ padding: 20px;
14
+ background: #f8f9fa;
15
+ }
16
+ .container {
17
+ background: white;
18
+ padding: 30px;
19
+ border-radius: 8px;
20
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
21
+ }
22
+ h1 {
23
+ color: #333;
24
+ margin-bottom: 30px;
25
+ }
26
+ .test-section {
27
+ margin-bottom: 30px;
28
+ padding: 20px;
29
+ border: 1px solid #e9ecef;
30
+ border-radius: 6px;
31
+ }
32
+ .test-section h3 {
33
+ margin-top: 0;
34
+ color: #495057;
35
+ }
36
+ .url-test {
37
+ margin: 10px 0;
38
+ padding: 10px;
39
+ background: #f8f9fa;
40
+ border-left: 4px solid #007bff;
41
+ font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
42
+ font-size: 13px;
43
+ word-break: break-all;
44
+ }
45
+ .should-match {
46
+ border-left-color: #28a745;
47
+ }
48
+ .should-not-match {
49
+ border-left-color: #dc3545;
50
+ }
51
+ button {
52
+ background: #007bff;
53
+ color: white;
54
+ border: none;
55
+ padding: 10px 20px;
56
+ border-radius: 4px;
57
+ cursor: pointer;
58
+ margin: 5px;
59
+ }
60
+ button:hover {
61
+ background: #0056b3;
62
+ }
63
+ .status {
64
+ margin-top: 20px;
65
+ padding: 15px;
66
+ border-radius: 4px;
67
+ font-weight: bold;
68
+ }
69
+ .success {
70
+ background: #d4edda;
71
+ color: #155724;
72
+ border: 1px solid #c3e6cb;
73
+ }
74
+ .error {
75
+ background: #f8d7da;
76
+ color: #721c24;
77
+ border: 1px solid #f5c6cb;
78
+ }
79
+ </style>
80
+ </head>
81
+ <body>
82
+ <div class="container">
83
+ <h1>JavaScript Proxy URI Pattern Test</h1>
84
+
85
+ <div class="test-section">
86
+ <h3>Default Pattern</h3>
87
+ <p>
88
+ Default pattern:
89
+ <code>uploads\/plugin-version\/\d+\/file_name\/.*\.js(\?.*)?</code>
90
+ </p>
91
+ <p>
92
+ This should match JavaScript files in the uploads/plugin-version/*
93
+ path on any domain.
94
+ </p>
95
+ </div>
96
+
97
+ <div class="test-section">
98
+ <h3>URLs That Should Match (Will Redirect)</h3>
99
+
100
+ <div class="url-test should-match">
101
+ https://example.com/uploads/plugin-version/123/file_name/script.js
102
+ </div>
103
+
104
+ <div class="url-test should-match">
105
+ https://westernightwall.zenith-develop.env.eventfinity.app/uploads/plugin-version/3/file_name/T9OvqS1727804478.js
106
+ </div>
107
+
108
+ <div class="url-test should-match">
109
+ https://different-domain.com/uploads/plugin-version/456/file_name/myfile.js?signature=abc123&expires=789
110
+ </div>
111
+
112
+ <div class="url-test should-match">
113
+ https://api.staging.example.org/uploads/plugin-version/999/file_name/component.js?token=xyz
114
+ </div>
115
+ </div>
116
+
117
+ <div class="test-section">
118
+ <h3>URLs That Should NOT Match (No Redirect)</h3>
119
+
120
+ <div class="url-test should-not-match">
121
+ https://example.com/uploads/versions/123/file_name/script.js
122
+ <small>(different path: versions instead of plugin-version)</small>
123
+ </div>
124
+
125
+ <div class="url-test should-not-match">
126
+ https://example.com/uploads/plugin-version/123/file_name/style.css
127
+ <small>(not a .js file)</small>
128
+ </div>
129
+
130
+ <div class="url-test should-not-match">
131
+ https://example.com/other-path/plugin-version/123/file_name/script.js
132
+ <small>(wrong base path)</small>
133
+ </div>
134
+
135
+ <div class="url-test should-not-match">
136
+ https://localhost:3060/src/Plugin.vue
137
+ <small>(localhost - prevent redirect loops)</small>
138
+ </div>
139
+ </div>
140
+
141
+ <div class="test-section">
142
+ <h3>Test Actions</h3>
143
+ <p>Click the buttons below to test loading JavaScript files:</p>
144
+
145
+ <button
146
+ onclick="
147
+ testUrl(
148
+ 'https://example.com/uploads/plugin-version/123/file_name/test.js',
149
+ )
150
+ "
151
+ >
152
+ Test Matching URL
153
+ </button>
154
+
155
+ <button
156
+ onclick="
157
+ testUrl(
158
+ 'https://example.com/uploads/plugin-version/456/file_name/test.js?signed=true',
159
+ )
160
+ "
161
+ >
162
+ Test Matching URL with Query
163
+ </button>
164
+
165
+ <button onclick="testUrl('https://example.com/other-path/test.js')">
166
+ Test Non-Matching URL
167
+ </button>
168
+
169
+ <div id="status"></div>
170
+ </div>
171
+
172
+ <div class="test-section">
173
+ <h3>Instructions</h3>
174
+ <ol>
175
+ <li>Install and enable the JavaScript Proxy extension</li>
176
+ <li>Configure it to redirect to your local development server</li>
177
+ <li>Open browser developer tools to see network requests</li>
178
+ <li>Click the test buttons above to see which URLs get redirected</li>
179
+ <li>
180
+ URLs matching the pattern should redirect to your local server
181
+ </li>
182
+ <li>URLs not matching should load normally (and probably fail)</li>
183
+ </ol>
184
+ </div>
185
+ </div>
186
+
187
+ <script>
188
+ function testUrl(url) {
189
+ const status = document.getElementById("status")
190
+ status.innerHTML = `<div class="status">Testing: ${url}</div>`
191
+
192
+ // Create a script element to test the URL
193
+ const script = document.createElement("script")
194
+ script.src = url
195
+
196
+ script.onload = function () {
197
+ status.innerHTML = `<div class="status success">✅ Successfully loaded: ${url}</div>`
198
+ }
199
+
200
+ script.onerror = function () {
201
+ status.innerHTML = `<div class="status error">❌ Failed to load: ${url}<br><small>This is expected for test URLs that don't exist</small></div>`
202
+ }
203
+
204
+ // Add to page to trigger the request
205
+ document.head.appendChild(script)
206
+
207
+ // Remove after a short delay
208
+ setTimeout(() => {
209
+ if (script.parentNode) {
210
+ script.parentNode.removeChild(script)
211
+ }
212
+ }, 5000)
213
+ }
214
+
215
+ // Log current page URL for reference
216
+ console.log("Test page URL:", window.location.href)
217
+ console.log(
218
+ "Use browser dev tools to monitor network requests and see proxy behavior",
219
+ )
220
+ </script>
221
+ </body>
222
+ </html>
@@ -58,11 +58,11 @@ Alternatively, use an online SVG to PNG converter for the files in `icons/`.
58
58
 
59
59
  ### Example Rules
60
60
 
61
- | Pattern | Redirect To | Description |
62
- |---------|-------------|-------------|
63
- | `api\.example\.com` | `api.alternative.com` | Redirect all API calls from example.com to alternative.com |
64
- | `.*\.googleapis\.com` | `api.myproxy.com` | Redirect all Google API calls to your proxy server |
65
- | `cdn\.jsdelivr\.net` | `my-cdn.example.com` | Redirect CDN requests to your own server |
61
+ | Pattern | Redirect To | Description |
62
+ | --------------------- | --------------------- | ---------------------------------------------------------- |
63
+ | `api\.example\.com` | `api.alternative.com` | Redirect all API calls from example.com to alternative.com |
64
+ | `.*\.googleapis\.com` | `api.myproxy.com` | Redirect all Google API calls to your proxy server |
65
+ | `cdn\.jsdelivr\.net` | `my-cdn.example.com` | Redirect CDN requests to your own server |
66
66
 
67
67
  ## How It Works
68
68
 
@@ -115,20 +115,23 @@ The extension requires the following permissions:
115
115
  ## Troubleshooting
116
116
 
117
117
  ### Extension Not Working
118
+
118
119
  - Check that the extension is enabled in `about:addons`
119
120
  - Verify permissions are granted
120
121
  - Check browser console for errors
121
122
 
122
123
  ### Icons Not Showing
124
+
123
125
  - Ensure PNG icon files exist in the `icons/` directory
124
126
  - Convert SVG files to PNG if needed
125
127
  - Check file permissions
126
128
 
127
129
  ### Rules Not Matching
130
+
128
131
  - Test regex patterns using online regex testers
129
132
  - Ensure domains are properly escaped (use `\.` for literal dots)
130
133
  - Check that the proxy is enabled (green button)
131
134
 
132
135
  ## License
133
136
 
134
- This extension is provided as-is for educational and development purposes.
137
+ This extension is provided as-is for educational and development purposes.