diff --git a/src/content.js b/src/content.js index 29e81fa..a414bc2 100644 --- a/src/content.js +++ b/src/content.js @@ -4,6 +4,7 @@ const DEFAULT_SETTINGS = { apiKey: "sk-TvFhtxHAPXEcmRtyva-ctA", textOpacity: 10, model: "llama3.2-90b", + background: false, }; const MAX_CONTEXT_LENGTH = 6000; @@ -49,7 +50,7 @@ const queryLLM = async (text) => { messages: [ { role: "user", - content: `You are tasked to solve an exam. Exam's page context: ${pageContext}\n\Answer this question of said exam in very short but accurate manner (Utilize context to figure out the exam's topic. ONLY REPLY WITH ANSWER TO THE QUESTION): ${text}`, + content: `You are tasked to solve an exam. It is a website. Exam's page context: ${pageContext}\n\Answer this question of said exam in a very short but accurate manner (Utilize context to figure out the exam's topic. ONLY REPLY WITH ANSWER TO THE QUESTION. If you do not know, reply with "I do not know."): ${text}`, }, ], temperature: 0.1, @@ -80,10 +81,19 @@ const createOverlay = (text) => { padding: 5px; z-index: 2147483647; color: rgba(0, 0, 0, ${settings.textOpacity / 100}); - font-size: 16px; + font-size: 12px; max-width: 600px; white-space: pre-wrap; pointer-events: none; + ${ + settings.background + ? ` + background-color: rgba(255, 255, 255, ${settings.textOpacity / 100}); + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + ` + : "" + } `; document.body.appendChild(overlay); diff --git a/src/popup.html b/src/popup.html index 004edbe..e6f8bfd 100644 --- a/src/popup.html +++ b/src/popup.html @@ -224,7 +224,7 @@