Skip to content

Commit

Permalink
Bug_fix and Ui Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifalikhan36 committed Dec 2, 2024
1 parent b5df674 commit e2a05f6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 168 deletions.
161 changes: 0 additions & 161 deletions LeakCode/codeviewer.html

This file was deleted.

4 changes: 2 additions & 2 deletions LeakCode/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"background": {
"service_worker": "background.js"
},
"host_permissions": ["https://leetcode.com/*"],
"host_permissions": ["https://leetcode.com/problems/*"],
"content_scripts": [
{
"matches": ["https://leetcode.com/*"],
"matches": ["https://leetcode.com/problems/*"],
"js": ["content.js"],
"run_at": "document_end"
}
Expand Down
30 changes: 25 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
padding: 0;
display: flex;
justify-content: center;
align-items: center;
align-items: flex-start;
min-height: 100vh;
padding: 20px;
}
Expand All @@ -40,6 +40,8 @@
margin-top: 0;
color: #a29bfe;
font-size: 1.5rem;
border-bottom: 2px solid #8e44ad;
padding-bottom: 5px;
}

.code-container {
Expand All @@ -50,6 +52,7 @@
font-family: "Courier New", Courier, monospace;
position: relative;
max-height: 400px;
margin-bottom: 10px;
}

.copy-button {
Expand All @@ -70,6 +73,23 @@
background-color: #6c3483;
}

.explanation-container {
background-color: #2c2c2c;
border-radius: 8px;
padding: 15px;
white-space: pre-wrap;
word-wrap: break-word;
min-height: 100px;
}

.video-container {
background-color: #2c2c2c;
border-radius: 8px;
padding: 15px;
text-align: center;
word-wrap: break-word;
}

.video-container iframe {
width: 100%;
height: 315px;
Expand Down Expand Up @@ -97,6 +117,10 @@
.code-container {
padding: 10px;
}

.video-container iframe {
height: 250px;
}
}

@media screen and (max-width: 480px) {
Expand Down Expand Up @@ -183,15 +207,11 @@ <h2>Recommended Video</h2>
}

// YouTube Video
// Video query
const query = params.get("queryvideo");
if (query) {
// Embed a video by building a YouTube URL
const videoUrl = `https://www.youtube.com/results?search_query=${encodeURIComponent(
query
)}`;

// Display a message or a placeholder video link
videoContainer.innerHTML = `
<p>Click <a href="${videoUrl}" target="_blank">Watch Explanation video</a> to view videos for "${query}".</p>
`;
Expand Down

0 comments on commit e2a05f6

Please sign in to comment.