Skip to content

Commit 197823a

Browse files
Implemented Dashboard
1 parent d8e6ed2 commit 197823a

26 files changed

+17631
-6
lines changed

captionreader.js renamed to Chrome-extension/captionreader.js

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
console.log("reader loaded");
22
try {
3-
// CNusmb
3+
// CNusmb class for caption container
44
let lwrSpeech = "";
5+
6+
let alertStatus = false;
7+
8+
// Observes subtitle container
59
const subtitleObserver = new MutationObserver((mutations) => {
610
mutations.forEach((mutation) => {
711
const newNodes = mutation.addedNodes;
@@ -16,29 +20,40 @@ try {
1620
});
1721
});
1822

23+
// calls the observer after every 5s
1924
const refresh = setInterval(() => {
2025
const subtitleDiv = document.querySelector("div[jscontroller='D1tHje']");
26+
if (
27+
alertStatus == false &&
28+
subtitleDiv != null &&
29+
subtitleDiv.style.display === "none"
30+
) {
31+
alert("Turn your captions on for working of IVC");
32+
alertStatus = true;
33+
}
2134
subtitleObserver.observe(subtitleDiv, {
2235
childList: true,
2336
subtree: true,
2437
attributes: false,
2538
characterData: false,
2639
});
2740
}, 5000);
41+
42+
// Sends the caption text after every 60s
2843
const sendRequest = setInterval(() => {
29-
const text=lwrSpeech;
30-
lwrSpeech="";
31-
fetch("https://eaogudskckezrfywev.pythonanywhere.com/submit", {
44+
const text = lwrSpeech;
45+
lwrSpeech = "";
46+
fetch("https://34d40d918c50.ngrok.io/submit", {
3247
method: "post",
3348
body: JSON.stringify(text),
3449
})
3550
.then(function (response) {
3651
return response.json();
3752
})
3853
.then(function (data) {
39-
console.log(data)
54+
console.log(data);
4055
});
41-
},30000);
56+
}, 60000);
4257
} catch (e) {
4358
console.log("error in transcripting", e);
4459
}
File renamed without changes.
File renamed without changes.

dashboard/.eslintcache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"F:\\blueprint-IVC\\dashboard\\src\\index.js":"1","F:\\blueprint-IVC\\dashboard\\src\\App.js":"2","F:\\blueprint-IVC\\dashboard\\src\\reportWebVitals.js":"3","F:\\blueprint-IVC\\dashboard\\src\\src\\Dashboard.js":"4","F:\\blueprint-IVC\\dashboard\\src\\src\\Scores.js":"5","F:\\blueprint-IVC\\dashboard\\src\\src\\Title.js":"6","F:\\blueprint-IVC\\dashboard\\src\\src\\Overall.js":"7"},{"size":500,"mtime":499162500000,"results":"8","hashOfConfig":"9"},{"size":205,"mtime":1608364543123,"results":"10","hashOfConfig":"9"},{"size":362,"mtime":499162500000,"results":"11","hashOfConfig":"9"},{"size":7377,"mtime":1608373129546,"results":"12","hashOfConfig":"9"},{"size":1908,"mtime":1608371733532,"results":"13","hashOfConfig":"9"},{"size":356,"mtime":1608364774536,"results":"14","hashOfConfig":"9"},{"size":2821,"mtime":1608372803883,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1fcwkzp",{"filePath":"18","messages":"19","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"warningCount":9,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"F:\\blueprint-IVC\\dashboard\\src\\index.js",[],"F:\\blueprint-IVC\\dashboard\\src\\App.js",["30"],"F:\\blueprint-IVC\\dashboard\\src\\reportWebVitals.js",[],"F:\\blueprint-IVC\\dashboard\\src\\src\\Dashboard.js",["31","32","33","34","35","36","37","38","39"],"F:\\blueprint-IVC\\dashboard\\src\\src\\Scores.js",["40"],"F:\\blueprint-IVC\\dashboard\\src\\src\\Title.js",[],"F:\\blueprint-IVC\\dashboard\\src\\src\\Overall.js",["41","42","43","44"],{"ruleId":"45","severity":1,"message":"46","line":1,"column":8,"nodeType":"47","messageId":"48","endLine":1,"endColumn":12},{"ruleId":"45","severity":1,"message":"49","line":1,"column":17,"nodeType":"47","messageId":"48","endLine":1,"endColumn":25},{"ruleId":"45","severity":1,"message":"50","line":9,"column":8,"nodeType":"47","messageId":"48","endLine":9,"endColumn":12},{"ruleId":"45","severity":1,"message":"51","line":15,"column":8,"nodeType":"47","messageId":"48","endLine":15,"endColumn":12},{"ruleId":"45","severity":1,"message":"52","line":21,"column":8,"nodeType":"47","messageId":"48","endLine":21,"endColumn":16},{"ruleId":"45","severity":1,"message":"53","line":22,"column":8,"nodeType":"47","messageId":"48","endLine":22,"endColumn":22},{"ruleId":"45","severity":1,"message":"54","line":23,"column":8,"nodeType":"47","messageId":"48","endLine":23,"endColumn":19},{"ruleId":"45","severity":1,"message":"55","line":24,"column":8,"nodeType":"47","messageId":"48","endLine":24,"endColumn":14},{"ruleId":"45","severity":1,"message":"56","line":25,"column":8,"nodeType":"47","messageId":"48","endLine":25,"endColumn":18},{"ruleId":"45","severity":1,"message":"57","line":176,"column":9,"nodeType":"47","messageId":"48","endLine":176,"endColumn":25},{"ruleId":"45","severity":1,"message":"58","line":9,"column":8,"nodeType":"47","messageId":"48","endLine":9,"endColumn":13},{"ruleId":"45","severity":1,"message":"58","line":9,"column":8,"nodeType":"47","messageId":"48","endLine":9,"endColumn":13},{"ruleId":"45","severity":1,"message":"59","line":10,"column":8,"nodeType":"47","messageId":"48","endLine":10,"endColumn":16},{"ruleId":"45","severity":1,"message":"60","line":11,"column":8,"nodeType":"47","messageId":"48","endLine":11,"endColumn":17},{"ruleId":"45","severity":1,"message":"61","line":54,"column":16,"nodeType":"47","messageId":"48","endLine":54,"endColumn":23},"no-unused-vars","'logo' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used.","'List' is defined but never used.","'Grid' is defined but never used.","'MenuItem' is defined but never used.","'FormHelperText' is defined but never used.","'FormControl' is defined but never used.","'Select' is defined but never used.","'InputLabel' is defined but never used.","'fixedHeightPaper' is assigned a value but never used.","'Title' is defined but never used.","'DoneIcon' is defined but never used.","'ClearIcon' is defined but never used.","'setData' is assigned a value but never used."]

dashboard/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

dashboard/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Getting Started with Create React App
2+
3+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `npm start`
10+
11+
Runs the app in the development mode.\
12+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13+
14+
The page will reload if you make edits.\
15+
You will also see any lint errors in the console.
16+
17+
### `npm test`
18+
19+
Launches the test runner in the interactive watch mode.\
20+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21+
22+
### `npm run build`
23+
24+
Builds the app for production to the `build` folder.\
25+
It correctly bundles React in production mode and optimizes the build for the best performance.
26+
27+
The build is minified and the filenames include the hashes.\
28+
Your app is ready to be deployed!
29+
30+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31+
32+
### `npm run eject`
33+
34+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35+
36+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37+
38+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39+
40+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41+
42+
## Learn More
43+
44+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45+
46+
To learn React, check out the [React documentation](https://reactjs.org/).
47+
48+
### Code Splitting
49+
50+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51+
52+
### Analyzing the Bundle Size
53+
54+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55+
56+
### Making a Progressive Web App
57+
58+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59+
60+
### Advanced Configuration
61+
62+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63+
64+
### Deployment
65+
66+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67+
68+
### `npm run build` fails to minify
69+
70+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

0 commit comments

Comments
 (0)