Web Accessibility Helper Adit Bhatt, Angelina Fahs, Christina Liu, Ian McKenzie
git
node
npm
web-ext
npm install -g web-ext
git clone https://github.com/avbhatt/SOCS.git
SOCS
npm install
from the root directory
package.json
were installed correctlynode index.js
plugin
folder within SOCS
web-ext
web-ext run --firefox="/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox-bin"
--firefox
will change depending on where Firefox Developer Edition is installedmanifest.json
index.js
Starts mongo
connection by loading mongo.js
file
mongo.js
Exports functions:
server_init
mongo
database (information is below) and initializes express
server by loading express.js
filestoreData
storeDataSimple
deleteData
updateData
updateEntityType
updateEntityWebsite
updateEntityStatus
updateAnnVote
removeEntity
getEntityInfo
getWaitingUser
getHelper
getWebsiteAnnotations
express.js
Set up server settings such as ports, parsing, and cors
Export functions:
init_socket_server
socket.io
connectionjoin
message
disconnecting
close
init_http_server
/getAnnotations
mongo
response to getWebsiteAnnotations
given website/postAnnotation
mongo
function storeData
with provided annotation/updateAnnVote
mongo
function changeAnnVote
/getEntityInfo
mongo
response to getEntityInfo
given ID or with "Does Not Exist"/updateEntityType
mongo
function updateEntityType
with provided ID and type/updateEntityWebsite
mongo
function updateEntityWebsite
with provided ID and websiteHelper functions
get_date
send_msg
mongo
function storeData
to save message logwaitingUserCheck
All components communicate with background.js
using the message
webExtension API.
background.js
The bulk of the work is done in this script.
Connects to socket server and emits join
message to link to specific chat room
POST
to /updateEntityType
to set default type to User
Handles website updates by POST
to /updateEntityWebsite
with new URL
Handles messages from below extension components
type_change
message_send
check_popup
annotation_submitted
close
Handles socket.io
message
by sending extension message to chat
Handles annotation submissions by POST
to /postAnnotations
with annotation content
popup/options.[js,css,html]
Dropdown for changing between user and helper. Sends updated type to background
in message.
sidebar/chat.js
Handles message input by sending message to background
dealing with message content. Also handles close button and help button.
Receives messages from background
with message replies and updates UI to display.
sidebar/annotation-list.js
Fetches annotations for a website on website updates via GET
request to /getAnnotations
and updates the sidebar with these annotations
sidebar/sidebar.[css,html]
Creates buttons, divs, lists needed for chat and annotation interface. In-line style used to change display types dynamically.
sidebar/submit_annotation.js
Handles the annotation submission form by sending message to annotation-form.js
upon clicking the submit annotation button.
annotation-form.js
Content script that creates the annotation submission form as a modal. Sends the annotation content to background
in message.
active_entities
message_logs
annotations