Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lessons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Statistics
lessons
Commits
f1a84439
Commit
f1a84439
authored
Dec 13, 2018
by
ROBERT PATRICK CAREY III
🗿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Favor FontFaceObserver
parent
f41011bb
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
modules/user_preferences/js/dist/user-preferences.js
modules/user_preferences/js/dist/user-preferences.js
+1
-1
modules/user_preferences/js/src/user-preferences.js
modules/user_preferences/js/src/user-preferences.js
+2
-1
modules/user_preferences/package-lock.json
modules/user_preferences/package-lock.json
+5
-0
modules/user_preferences/package.json
modules/user_preferences/package.json
+2
-1
modules/user_preferences/webpack.config.js
modules/user_preferences/webpack.config.js
+2
-2
No files found.
modules/user_preferences/js/dist/user-preferences.js
View file @
f1a84439
This diff is collapsed.
Click to expand it.
modules/user_preferences/js/src/user-preferences.js
View file @
f1a84439
...
...
@@ -73,7 +73,8 @@ const userPreferences = ({
return
this
;
},
fetchFontFace
(
params
){
var
font
=
new
FontFace
(
params
.
name
,
"
url(
"
+
params
.
url
+
"
)
"
);
let
FontFaceObserver
=
require
(
'
fontfaceobserver
'
);
let
font
=
new
FontFaceObserver
(
params
.
name
,
"
url(
"
+
params
.
url
+
"
)
"
);
font
.
load
().
then
(
function
()
{
document
.
fonts
.
add
(
font
);
...
...
modules/user_preferences/package-lock.json
View file @
f1a84439
...
...
@@ -4249,6 +4249,11 @@
"readable-stream"
:
"^2.0.4"
}
},
"fontfaceobserver"
:
{
"version"
:
"2.1.0"
,
"resolved"
:
"https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.1.0.tgz"
,
"integrity"
:
"sha512-ReOsO2F66jUa0jmv2nlM/s1MiutJx/srhAe2+TE8dJCMi02ZZOcCTxTCQFr3Yet+uODUtnr4Mewg+tNQ+4V1Ng=="
},
"for-in"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz"
,
...
...
modules/user_preferences/package.json
View file @
f1a84439
...
...
@@ -47,6 +47,7 @@
"webpack-glob-entries"
:
"^1.0.1"
},
"dependencies"
:
{
"@babel/polyfill"
:
"^7.0.0"
"@babel/polyfill"
:
"^7.0.0"
,
"fontfaceobserver"
:
"^2.1.0"
}
}
modules/user_preferences/webpack.config.js
View file @
f1a84439
...
...
@@ -12,8 +12,8 @@ const config = {
module
:
{
rules
:
[
{
test
:
/
\.
js$/
,
exclude
:
/
node_modules
/
,
test
:
/
\.
m
?
js$/
,
exclude
:
/
(
node_modules|bower_components
)
/
,
use
:
{
loader
:
'
babel-loader
'
,
options
:
{
...
...
Write
Preview
Markdown
is supported
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