Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@justeat/fozzie

Package Overview
Dependencies
Maintainers
52
Versions
326
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeat/fozzie - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0-beta.0

dist/js/modules/stopFoit/test/index.test.js

17

CHANGELOG.md

@@ -11,2 +11,19 @@ # Changelog

v6.0.0-beta.0
------------------------------
*August 24, 2021*
### Updated
- pie-design-tokens package to v1.0.0-beta.0 to include new font vars
### Added
- `$font-family-secondary` as a fallback font (Arial)
### Changed
- `$font-weight-headings` use `$font-weight-extrabold` font weight (800)
### Removed
- Menulog font files
v5.0.0

@@ -13,0 +30,0 @@ ------------------------------

22

dist/js/modules/stopFoit/index.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = exports.hasFontLoaded = void 0;
exports.default = exports.stopFoit = void 0;

@@ -16,5 +16,5 @@ var _fontfaceobserver = _interopRequireDefault(require("fontfaceobserver"));

/**
* @overview hasFontLoaded reduces the amount of time a user has invisible text when using webfonts.
* @overview stopFOIT reduces the amount of time a user has invisible text when using webfonts.
*
* @module hasFontLoaded
* @module stopFOIT
*/

@@ -26,15 +26,21 @@

*/
var hasFontLoaded = function hasFontLoaded() {
var stopFoit = function stopFoit() {
// Create a new `FontFaceObserver` for each webfont
var baseFont = new _fontfaceobserver.default('JustEatBasis'); // On load of each font we add `has-fontsLoaded` class with the font type modifier
var baseFont = new _fontfaceobserver.default('Hind Vadodara');
var headingFont = new _fontfaceobserver.default('Ubuntu'); // On load of each font we add `has-fontsLoaded` class with the font type modifier
baseFont.load(null, 3000).then(function () {
document.body.classList.add('webfonts-loaded');
document.body.classList.remove('is-fontsLoading--base');
}).catch(function () {
(0, _fLogger.logError)('Custom font is unable to load');
});
headingFont.load(null, 3000).then(function () {
document.body.classList.remove('is-fontsLoading--heading');
}).catch(function () {
(0, _fLogger.logError)('Custom font is unable to load');
});
};
exports.hasFontLoaded = hasFontLoaded;
var _default = hasFontLoaded;
exports.stopFoit = stopFoit;
var _default = stopFoit;
exports.default = _default;

@@ -5,3 +5,3 @@ {

"description": "UI Web Framework for the Just Eat Global Platform",
"version": "5.0.0",
"version": "6.0.0-beta.0",
"main": "dist/js/index.js",

@@ -40,3 +40,3 @@ "files": [

"@justeat/f-utils": "2.0.0",
"@justeat/pie-design-tokens": "0.19.0",
"@justeat/pie-design-tokens": "1.0.0-beta.0",
"fontfaceobserver": "2.1.0",

@@ -43,0 +43,0 @@ "include-media": "1.4.10",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc