Skip to content

Commit 6d40552

Browse files
committed
Fix URL issue
1 parent 03efcaa commit 6d40552

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

contentscript.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
// console.log("Debugging github-linkify-cmssw");
22

3-
// the lines of code are stored in a table
4-
table = document.getElementsByClassName("js-file-line-container")[0];
5-
6-
// get current page URL
7-
// better way to do this?
8-
url = table.baseURI;
93

104
// make root URL, i.e. up to & including CMSSW_X_Y_Z_AAA, or tag hash
115
// note, be careful as can have URLs in diff formats:
126
// github.com/cms-sw/cmssw/blob/CMSSW_7_2_X/DataFormats/JetReco/interface/GenJetCollection.h
137
// with CMSSW_1_2_3, CMSSW_1_2_X, CMSSW_1_2_3_SHLC_fixTk, etc,
148
// or
159
// github.com/cms-sw/cmssw/blob/975...a78/DataFormats/JetReco/interface/GenJetCollection.h
10+
var url = document.URL;
1611
var cmssw_pattern = /.*\/cmssw\/blob\/[_a-zA-Z0-9]*?\//;
1712
var rootURL = "";
1813
cmssw = cmssw_pattern.exec(url)[0];

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Github linkify for CMSSW",
33
"description": "Turns #include statments in C++ files, and import X/from X import Y/process.load(XXX.YYY.ZZZ_cff) in python config files, into links when browing CMSSW on Github.",
4-
"version": "0.2.2",
4+
"version": "0.2.3",
55
"content_scripts": [
66
{
77
"matches": [

0 commit comments

Comments
 (0)