-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 78c5788
Showing
10 changed files
with
1,190 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { | ||
if(request.type === "twitterOrNot") | ||
{ | ||
// window.stage = 4; | ||
chrome.tabs.query({ active: true}, function(tabs){ | ||
const currentTab = tabs[0]; | ||
if(currentTab.url.includes("x.com")) | ||
{ | ||
sendResponse({check: true}) | ||
} | ||
else{ | ||
sendResponse({check: false}) | ||
} | ||
}) | ||
} | ||
return true; | ||
}); | ||
|
||
|
||
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse){ | ||
if(request.type === "getData") | ||
{ | ||
fetch("https://recall-smoky.vercel.app/api/token").then((response) => { | ||
if (response.ok) | ||
return response.json(); // Convert the response to JSON | ||
else | ||
throw new Error("Error fetching data"); | ||
}).then((data) => { | ||
sendResponse({ data: data }); // Use the parsed JSON data | ||
}).catch((error) => { | ||
console.error(error); | ||
}); | ||
// sendResponse({data: "hello"}); | ||
return true; | ||
} | ||
}) |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Number Slider</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="slider-container"> | ||
<h1>Recall</h1> | ||
<h3>Slide according to intensity to which posts are to be shown</h3> | ||
<input type="range" min="1" max="10" value="5" class="slider" id="numberSlider"> | ||
<p>Value: <span id="sliderValue">5</span></p> | ||
</div> | ||
|
||
<script src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "recall", | ||
"description": "Help Alzimer's people to remember loved ones.", | ||
"version": "1.0", | ||
"icons": { | ||
"16": "images/icon16.png", | ||
"32": "images/icon32.png", | ||
"48": "images/icon48.png", | ||
"128": "images/icon128.png" | ||
}, | ||
"manifest_version": 3, | ||
"background": { | ||
"service_worker": "background.js" | ||
}, | ||
"permissions": [ | ||
"activeTab", | ||
"tabs", | ||
"scripting", | ||
"cookies" | ||
], | ||
"content_scripts": [ | ||
{ | ||
"matches": [ | ||
"<all_urls>" | ||
], | ||
"js": [ | ||
"content.js" | ||
], | ||
"run_at": "document_end" | ||
} | ||
], | ||
"action": { | ||
"default_popup": "index.html" | ||
}, | ||
"host_permissions": [ | ||
"http://localhost:3001/*", | ||
"https://*/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const slider = document.getElementById('numberSlider'); | ||
const output = document.getElementById('sliderValue'); | ||
|
||
slider.oninput = function() { | ||
output.textContent = this.value; | ||
window.stage = this.value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
} | ||
|
||
.slider-container { | ||
text-align: center; | ||
} | ||
|
||
.slider { | ||
-webkit-appearance: none; | ||
width: 100%; | ||
height: 8px; | ||
border-radius: 5px; | ||
/* background: #ddd; */ | ||
outline: none; | ||
opacity: 0.7; | ||
transition: opacity .2s; | ||
} | ||
|
||
.slider:hover { | ||
opacity: 1; | ||
} | ||
|
||
.slider::-webkit-slider-thumb { | ||
-webkit-appearance: none; | ||
appearance: none; | ||
width: 25px; | ||
height: 25px; | ||
border-radius: 50%; | ||
background: #4CAF50; | ||
cursor: pointer; | ||
} | ||
|
||
.slider::-moz-range-thumb { | ||
width: 25px; | ||
height: 25px; | ||
border-radius: 50%; | ||
background: #4CAF50; | ||
cursor: pointer; | ||
} |