GitLab de la Mairie de Villejuif
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
COQBLIN Joachim
active-forks
Commits
4428b1dd
Unverified
Commit
4428b1dd
authored
Nov 15, 2020
by
np-trivial
Committed by
GitHub
Nov 15, 2020
Browse files
updated bookmarklet to use URL (#47)
parent
02bb8a0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
4428b1dd
...
...
@@ -17,7 +17,7 @@ Any time you're on a Github repo you can click the bookmarklet
and it'll bring up the Active Forks of that repo.
```
javascript
javascript
:
var
title
=
document
.
title
;
if
(
title
){
thing
=
title
.
split
(
'
:
'
);
var
newPage
=
'
https://techgaun.github.io/active-forks/index.html#
'
+
thing
[
0
];
open
(
newPage
,
'
targetname
'
)}
javascript
:
thing
=
document
.
URL
.
match
(
/github.com
\/([
A-z
][\w\-]
*
\/[
A-z
][\w\-]
*
)
/
);
if
(
thing
){
var
newPage
=
'
https://techgaun.github.io/active-forks/index.html#
'
+
thing
[
1
];
open
(
newPage
%
20
,
'
targetname
'
)
%
20
}
%
20
else
%
20
{
window
.
alert
(
"
Not%20a%20valid%20GitHub%20page
"
);
}
```

Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment