You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1) Escape the dot
2) Inclusive set instead of exclusion (do not match with ending `?test=lol`)
Note that `\w` is equivalent to `[a-zA-Z0-9_]`. And GitHub apparently also allows `.` and `-` in the usernames and repos.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Once it's activated, the extension will automatically trigger itself whenever yo
63
63
The online tool can be used as a [bookmarklet](https://en.wikipedia.org/wiki/Bookmarklet). To add one manually, press `Ctrl+D` to create a new bookmark and add this code in the URL field:
64
64
65
65
```js
66
-
javascript:!function(){if(m=window.location.href.match(/github.com\/([^\/]+)\/([^\/]+)/),m){window.open(`https://useful-forks.github.io/?repo=${m[1]}/${m[2]}`)}elsewindow.alert("Not a GitHub repo")}();
66
+
javascript:!function(){if(m=window.location.href.match(/github\.com\/([\w.-]+)\/([\w.-]+)/),m){window.open(`https://useful-forks.github.io/?repo=${m[1]}/${m[2]}`)}elsewindow.alert("Not a GitHub repo")}();
67
67
```
68
68
69
69
When you're viewing a GitHub repo in your browser, you can press the newly created bookmarklet and this will open the online tool for the repo in a new tab.
0 commit comments