| ... |
... |
@@ -11,7 +11,7 @@ |
| 11 |
11 |
}); |
| 12 |
12 |
function findCollab() { |
| 13 |
13 |
const driveURL = document.getElementById("driveURL"); |
| 14 |
|
- const driveId = getDriveId(driveURL.value); |
|
14 |
+ const driveId = getDriveId(driveURL); |
| 15 |
15 |
if(driveId) { |
| 16 |
16 |
console.log('Perform request with id:', driveId); |
| 17 |
17 |
} |
| ... |
... |
@@ -18,7 +18,7 @@ |
| 18 |
18 |
} |
| 19 |
19 |
function getDriveId(driveURL) { |
| 20 |
20 |
const url = new URL(driveURL); |
| 21 |
|
- const re = /\/(library|lib)\/([^/]*)\/.*/; |
|
21 |
+ const re = /\/library\/([^/]*)\/.*/; |
| 22 |
22 |
const id = re.exec(url.pathname)[1]; |
| 23 |
23 |
return id; |
| 24 |
24 |
} |