Skip to content

Commit

Permalink
Preparing for v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AmraniCh committed Sep 26, 2021
1 parent f62d8cd commit bdda1d0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Change Log

## v1.0 (2021-7-1)
## v1.2 (2021-9-26)

* First Stable Release.
* `Share Tech Mono`, `PT Mono`, `Oxygen Mono` fonts added (#4).
* Fixed dropdown bug with fonts that haven't any regular/italic styles. (#4).

## v1.1 (2021-9-12)

* `Roboto Mono`, `Ubuntu Mono`, `Courier Prime`, `JetBrains Mono` fonts added.
* `Roboto Mono`, `Ubuntu Mono`, `Courier Prime`, `JetBrains Mono` fonts added (#2).

## v1.0 (2021-7-1)

* First Stable Release.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Unhappy with the boring GitHub code viewer font? You're looking for a way to cha
- Ubuntu Mono.
- Courier Prime.
- JetBrains Mono.
- Share Tech Mono.
- PT Mono.
- Oxygen Mono.


If you have some other font that other developers could like, you can send a pull request to add it to this extension (The font must be free for personal use or licensed under a free open source license).

Expand Down
6 changes: 5 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ var /**
'Roboto Mono': 'https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;200;300;400;500;600;700&display=swap',
'Ubuntu Mono': 'https://fonts.googleapis.com/css2?family=Ubuntu+Mono:wght@400;700&display=swap',
'Courier Prime': 'https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap',
'JetBrains Mono': 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800&display=swap'
'JetBrains Mono': 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800&display=swap',
'Share Tech Mono': 'https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap',
'Fira Mono':'https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&display=swap',
'PT Mono':'https://fonts.googleapis.com/css2?family=PT+Mono&display=swap',
'Oxygen Mono':'https://fonts.googleapis.com/css2?family=Oxygen+Mono&display=swap',
},
selectors = {
code: '.blob-code-inner',
Expand Down
12 changes: 9 additions & 3 deletions src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,16 @@ function fillWeightsDropdown(family) {
weightsDropdown.innerHTML = '';

var i = 0;
while (i < weights.length) {
var weight = weights[i];
try {
while (i < weights.length) {
var weight = weights[i];
createOption(`${weight} - ${weightsNames[weight]}`, weight, weightsDropdown);
i++;
}
} catch (error) {
// fonts which return null on weights.length
var weight = 400;
createOption(`${weight} - ${weightsNames[weight]}`, weight, weightsDropdown);
i++;
}
}

Expand Down

0 comments on commit bdda1d0

Please sign in to comment.