Require single quotes

This commit is contained in:
valadaptive
2023-12-02 13:04:51 -05:00
parent a06f1e8ad6
commit a37f874e38
76 changed files with 4135 additions and 4134 deletions

View File

@ -1,4 +1,4 @@
import { callPopup, getRequestHeaders } from "../script.js";
import { callPopup, getRequestHeaders } from '../script.js';
export const SECRET_KEYS = {
HORDE: 'api_key_horde',
@ -143,7 +143,7 @@ async function checkOpenRouterAuth() {
if (params.has('code')) {
const code = params.get('code');
try {
const response = await fetch("https://openrouter.ai/api/v1/auth/keys", {
const response = await fetch('https://openrouter.ai/api/v1/auth/keys', {
method: 'POST',
body: JSON.stringify({ code }),
});
@ -163,8 +163,8 @@ async function checkOpenRouterAuth() {
toastr.success('OpenRouter token saved');
// Remove the code from the URL
const currentUrl = window.location.href;
const urlWithoutSearchParams = currentUrl.split("?")[0];
window.history.pushState({}, "", urlWithoutSearchParams);
const urlWithoutSearchParams = currentUrl.split('?')[0];
window.history.pushState({}, '', urlWithoutSearchParams);
} else {
throw new Error('OpenRouter token not saved');
}