Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@azerion/h5-azerion-branding
Advanced tools
Azerion branding library, similar to @azerion/splash but not tied into Phaser :)
This library is a simpeler version of the Splash screen, with no attachment to Phaser. This means that there is no splash, only utilities and image URL's
The most important part of this lib, as the name suggests, is the branding part. In order to have the branding (and the utilities for that matter) work correctly, you need to preload some files first. This library can handle this framework agnostic and the only thing you have to do is the following during your game's load setup:
h5branding.Branding.preload('version-for-cachebusting');
After this there are 3 main method you'll probably use a lot and some helpers that might be used occasionally. The main 3 methods are:
// This will allow you to get the correct URL to a branding logo
h5branding.Branding.brandingLogoUrl();
// Will open a new window to a site corrosponding to the branding that's leading for the current view location
h5branding.Branding.openCampaignLink('my-game-name', h5branding.UtmTargets.more_games);
// Should be used to check if the game allows links that escape the game, eg; walktrough buttons, logo's with links.
// h5branding.Branding.brandingLogoUrl honours this logic.
h5branding.Branding.outGoingLinksAllowed();
Apart from these there are some individual helper methods that allow you to check for individual platforms/portals:
h5branding.Branding.isInternal(); // Checks internal portal json
h5branding.Branding.isContracted(); // Checks contracted json
h5branding.Branding.isSpecial(); // Checks special json
h5branding.Branding.isAdmeen();
h5branding.Branding.isKongregate();
h5branding.Branding.isNewgrounds();
h5branding.Branding.isBild();
h5branding.Branding.isBip();
h5branding.Branding.isPlaycellApp();
h5branding.Branding.isSpil();
h5branding.Branding.isAirfi();
The utilities part is mostly used as simple helpers for the Branding part, but also includes some tiny other pieces of code that might be helpfull.
Let's start with the domain checking, in essence these are some helper parts that will allow you to filter the domain from which the game is called from. This can either be a direct call (apps / gd / partners like yandex), or an iframe call (anyn other inclusion :D).
h5branding.Utils.getSourceSite(); // Get the site from which this game/script is loaded
h5branding.Utils.getBrandingDomain() // Get the Branding that is tied to the current site, will return any of h5branding.BrandingDomain
h5branding.Utils.getDomain('http://test.com/foo') // Get the domain of any URI, example returns test.com
h5branding.Utils.isTc() // If it runs on internal TeamCity
h5branding.Utils.inIframe()
h5branding.Utils.getUrlParameter('key') // Get the value of an url parameter called 'key'
For the moment we have a simple google wrapper available that primarily is meant to set up two trackers (one for game, one for Fabrique) and allows you to send simple screenViews. The class itself is Called GoogleAnalytics but the lib exposes the property h5branding.google with an instance of this class.
First of all the analytics need to be setup:
h5branding.google.setup(
'UA-436346-23', //The Analytics ID
'My Games', //The propery name
'version-2' //
);
After that you you can start sending screenviews. We use them to track a user's progress inside a game, and also to measure some KPI's
h5branding.google.sendScreenView('ScreenName');
// As a bonus you can also send Events:
h5branding.google.sendGenericEvent('Category', 'Action', 'Label');
FAQs
Azerion branding library, similar to @azerion/splash but not tied into Phaser :)
We found that @azerion/h5-azerion-branding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.