Update API base URL to 'http://goyave' in background, options, and popup scripts
All checks were successful
Create Release / build-and-release (push) Successful in 6s
All checks were successful
Create Release / build-and-release (push) Successful in 6s
This commit is contained in:
@@ -26,7 +26,7 @@ chrome.contextMenus.onClicked.addListener(async (info, tab) => {
|
||||
// Get API configuration
|
||||
const result = await chrome.storage.sync.get(['apiToken', 'apiBaseUrl']);
|
||||
const apiToken = result.apiToken;
|
||||
const apiBaseUrl = result.apiBaseUrl || 'http://192-168-100-199.sslip.io';
|
||||
const apiBaseUrl = result.apiBaseUrl || 'http://goyave';
|
||||
|
||||
if (!apiToken) {
|
||||
// Open options page if no token configured
|
||||
@@ -109,7 +109,7 @@ async function handleExtraction(url) {
|
||||
try {
|
||||
const result = await chrome.storage.sync.get(['apiToken', 'apiBaseUrl']);
|
||||
const apiToken = result.apiToken;
|
||||
const apiBaseUrl = result.apiBaseUrl || 'http://192-168-100-199.sslip.io';
|
||||
const apiBaseUrl = result.apiBaseUrl || 'http://goyave';
|
||||
|
||||
if (!apiToken) {
|
||||
throw new Error('API token not configured');
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<li>Go to your account settings</li>
|
||||
<li>Generate an API token</li>
|
||||
<li>Copy the token and paste it below</li>
|
||||
<li>Make sure your API base URL is correct (usually http://192-168-100-199.sslip.io)</li>
|
||||
<li>Make sure your API base URL is correct (usually http://goyave)</li>
|
||||
<li>Click "Test Connection" to verify everything works</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -179,8 +179,8 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label for="api-base-url">API Base URL</label>
|
||||
<input type="url" id="api-base-url" placeholder="http://192-168-100-199.sslip.io">
|
||||
<div class="help-text">The base URL of your SDB backend API (default: http://192-168-100-199.sslip.io)</div>
|
||||
<input type="url" id="api-base-url" placeholder="http://goyave">
|
||||
<div class="help-text">The base URL of your SDB backend API (default: http://goyave)</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="save-btn" id="save-btn">Save Settings</button>
|
||||
|
||||
@@ -14,7 +14,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
if (result.apiBaseUrl) {
|
||||
apiBaseUrlInput.value = result.apiBaseUrl;
|
||||
} else {
|
||||
apiBaseUrlInput.value = 'http://192-168-100-199.sslip.io';
|
||||
apiBaseUrlInput.value = 'http://goyave';
|
||||
}
|
||||
|
||||
// Save settings
|
||||
@@ -22,7 +22,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
e.preventDefault();
|
||||
|
||||
const apiToken = apiTokenInput.value.trim();
|
||||
const apiBaseUrl = apiBaseUrlInput.value.trim() || 'http://192-168-100-199.sslip.io';
|
||||
const apiBaseUrl = apiBaseUrlInput.value.trim() || 'http://goyave';
|
||||
|
||||
if (!apiToken) {
|
||||
showStatus('Please enter an API token', 'error');
|
||||
@@ -57,7 +57,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
|
||||
async function testConnection() {
|
||||
const apiToken = apiTokenInput.value.trim();
|
||||
const apiBaseUrl = apiBaseUrlInput.value.trim() || 'http://192-168-100-199.sslip.io';
|
||||
const apiBaseUrl = apiBaseUrlInput.value.trim() || 'http://goyave';
|
||||
|
||||
if (!apiToken) {
|
||||
showStatus('Please enter an API token first', 'error');
|
||||
|
||||
2
popup.js
2
popup.js
@@ -24,7 +24,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
// Check API token configuration
|
||||
const result = await chrome.storage.sync.get(['apiToken', 'apiBaseUrl']);
|
||||
const apiToken = result.apiToken;
|
||||
const apiBaseUrl = result.apiBaseUrl || 'http://192-168-100-199.sslip.io';
|
||||
const apiBaseUrl = result.apiBaseUrl || 'http://goyave';
|
||||
|
||||
if (!apiToken) {
|
||||
warning.classList.remove('hidden');
|
||||
|
||||
Reference in New Issue
Block a user