Skip to content

Commit 7bdf3e9

Browse files
committed
Bug fix - silly edit
1 parent 76de68c commit 7bdf3e9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

contentscript.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// the lines of code are stored in a table
2+
table = document.getElementsByClassName("js-file-line-container")[0];
3+
14
// get current page URL
25
url = table.baseURI;
36
// make root URL, i.e. only up to CMSSW_*
@@ -7,11 +10,14 @@ rootURL = url.substr(0, url.search(pattern)+cmssw.length+1);
710
// console.log("URL: " + rootURL);
811

912
// pattern to do #include matching
10-
cpp_pattern = /#include/;
11-
cpp_header_pattern = /[<\"].*[>\"]/;
13+
var cpp_pattern = /#include/;
14+
var cpp_header_pattern = /[<\"].*[>\"]/; // does "myheader.h" or <myheader>
1215

13-
// the lines of code are stored in a table
14-
table = document.getElementsByClassName("js-file-line-container")[0];
16+
// pattern to do python matching
17+
var py_pattern1 = /import/;
18+
var py_pattern2 = /from\s.*\simport\s.*/; // might not need this one
19+
var py_pattern3 = /import.*as.*/;
20+
var py_pattern4 = /process.load(.*)/;
1521

1622
// loop through all rows <tr>
1723
var rows = document.getElementsByTagName("tr");

0 commit comments

Comments
 (0)