@@ -45,14 +45,27 @@ const $ = {
4545 return elements . length === 1 ? elements [ 0 ] : elements ;
4646 } ,
4747
48- // wrapper around JQuery Ajax methods for GET request
48+ /**
49+ * Wrapper around JQuery Ajax methods for GET request
50+ *
51+ * @author Sheikh Saad Abdullah (A00447871)
52+ * @param {String } endpoint target to request data from
53+ * @param {Function } callback function to process data received
54+ */
4955 get ( endpoint , callback ) {
5056 jQuery
5157 . get ( SERVER_URL + endpoint , callback )
5258 . fail ( ( err ) => console . log ( err ) ) ;
5359 } ,
5460
55- // wrapper around JQuery Ajax methods for POST request
61+ //
62+ /**
63+ * Wrapper around JQuery Ajax methods for POST request
64+ *
65+ * @author Sheikh Saad Abdullah (A00447871)
66+ * @param {String } endpoint target to send request to
67+ * @param {Object } payload data to send
68+ */
5669 post ( endpoint , payload ) {
5770 jQuery
5871 . post ( SERVER_URL + endpoint , payload , ( res ) => console . log ( res ) )
@@ -107,6 +120,7 @@ const staticData = {
107120 * Enable or disable the editing of a blog post
108121 *
109122 * @author Mohak Shrivastava (A00445470)
123+ * @author Sheikh Saad Abdullah (A00447871)
110124 * @param {Object } elem DOM object of the switched edit toggle
111125 * @param {Number } index index of the toggle switch
112126 */
@@ -211,6 +225,7 @@ const staticData = {
211225 * Save a word to the word bank
212226 *
213227 * @author Mohak Shrivastava (A00445470)
228+ * @author Sheikh Saad Abdullah (A00447871)
214229 */
215230 saveWord ( ) {
216231 let wb = $ . el ( "#wb" ) ;
@@ -236,6 +251,7 @@ const staticData = {
236251 * else append the word to the text being edited
237252 *
238253 * @author Mohak Shrivastava (A00445470)
254+ * @author Sheikh Saad Abdullah (A00447871)
239255 * @param {String } word text from the word bank
240256 */
241257 putWord ( word ) {
@@ -285,6 +301,7 @@ const staticData = {
285301 * Variables and functions to control behaviour of the Keyboard
286302 *
287303 * @author Naziya Tasnim (A00447506)
304+ * @author Sheikh Saad Abdullah (A00447871)
288305 * -------------------------------------------------------------------- */
289306
290307 kbdFocus : null , // text field to focus
@@ -295,6 +312,7 @@ const staticData = {
295312 * Character of the key pressed
296313 *
297314 * @author Naziya Tasnim (A00447506)
315+ * @author Sheikh Saad Abdullah (A00447871)
298316 * @param {String } char character or string to convert
299317 * @returns uppercase of char if keyboard is in caps/shift mode
300318 */
@@ -315,6 +333,7 @@ const staticData = {
315333 * Adds a character to the text area
316334 *
317335 * @author Naziya Tasnim (A00447506)
336+ * @author Sheikh Saad Abdullah (A00447871)
318337 * @param {String } selection character to add to text area
319338 */
320339 addText ( selection ) {
0 commit comments