Skip to content

Commit 95cde2b

Browse files
Trey TurnerTrey Turner
authored andcommitted
added license comments to JS files
1 parent eddc9f1 commit 95cde2b

11 files changed

+413
-217
lines changed

Extension Files/assets/js/background.js

Lines changed: 192 additions & 172 deletions
Large diffs are not rendered by default.

Extension Files/assets/js/getBZCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
console.log('Get BZ Coordinates Script Started');
222

323
// listens for data of the different BZ columns and the data associated with and logs it

Extension Files/assets/js/getGithubDevProfileCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
console.log('Developer Profile Script Started');
222

323
// listens for data from different GitHub profile attributes then sends a response based on its results

Extension Files/assets/js/getGithubIssueListCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
console.log('Github Issuees Script Started');
222

323
// listens for the different GitHub issue coordinates and data associated with it, then sends

Extension Files/assets/js/getGithubPRListCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
console.log('Github Pull Requests Script Started');
222

323
// looks at a specific pull request and listen/logs the data and things associated with pull requests

Extension Files/assets/js/getGithubPullRequestCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
console.log('Github List of Pull Requests Script Started');
222

323
// looks at list of pull requests and logs its data

Extension Files/assets/js/getGoogleCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
console.log('Get Google Coordinates Script Started');
222

323
// listens and logs for google's data

Extension Files/assets/js/getSOCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
// Listen for messages, (stackoverflow) currently listens for code, images, the post's text
222
// the post's tags, and the question itself, it also logs and sends a response based on the result/data
323
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {

Extension Files/assets/js/getSearchCoordinate.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/****************************************************************************************************************************
2+
****************************
3+
* @file FILE.EXT
4+
*
5+
* @copyright (C) 2022 i-trace.org
6+
*
7+
* This file is part of iTrace Infrastructure http://www.i-trace.org/.
8+
* iTrace Infrastructure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
9+
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* iTrace Infrastructure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
13+
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License along with iTrace Infrastructure. If not, see
17+
* https://www.gnu.org/licenses/.
18+
************************************************************************************************************************
19+
********************************/
20+
121
// Listen for messages - logs and sends response based on search result, currently listesn for a question and its summary,
222
// a vote and its count, and a summary
323
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* Example code for finding the token user is gazing at used inside get_XXX_Coordinate.js
2+
3+
function findToken(parentElt, x, y) {
4+
console.log(parentElt.nodeName);
5+
if (parentElt.nodeName !== '#text') {
6+
console.log('didn\'t look on text node');
7+
return null;
8+
}
9+
var range = document.createRange();
10+
var words = parentElt.textContent.split(/( |\t)+/);
11+
var start = 0;
12+
var end = 0;
13+
14+
for (var i = 0; i < words.length; i++) {
15+
var word = words[i];
16+
end = start+word.length;
17+
range.setStart(parentElt, start);
18+
range.setEnd(parentElt, end);
19+
// not getBoundingClientRect as word could wrap
20+
var rects = range.getClientRects();
21+
var clickedRect = isGazeInRects(rects);
22+
if (clickedRect) {
23+
return [word, start, clickedRect];
24+
}
25+
start = end + 1;
26+
}
27+
28+
function isGazeInRects(rects) {
29+
for (var i = 0; i < rects.length; ++i) {
30+
var r = rects[i]
31+
if (r.left<x && r.right>x && r.top<y && r.bottom>y) {
32+
return r;
33+
}
34+
}
35+
return false;
36+
}
37+
return null;
38+
}
39+
*/

0 commit comments

Comments
 (0)