Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@goodgamestudios/cxf-banners
Advanced tools
Readme
The cxf plugin for displaying ad banners.
Where we control the place and rules for displaying the ads.
flowchart TB
subgraph "index.js"
initJSONLogic
initTrackingModule
indexFNinitGameController(initGameController)
end
subgraph "game-controller.js"
gcInit(init)
registerEvents
gcLogin(loginHandler)
subgraph paymentHandler
userPaid{validatePayment}
end
end
indexFNinitGameController --> gcInit
gcInit --> registerEvents
registerEvents --- gcLogin
registerEvents --- paymentHandler
userLogin([userLogin]) -- check JSON rules /over level10 etc/ --> gcLogin
gcLogin --> initBannerAd
subgraph adManager
subgraph initBannerAd
googletag{googletag}
googletag -- yes --> enableAd
googletag -- no --> loadGoogleTagSDK
end
addGoogleTagLogic --- initGPTLogic
addGoogleTagLogic --- startObserverForGameWidth
disableAd
end
subgraph htmlManager
addBannerDiv
end
loadGoogleTagSDK --> addGoogleTagLogic
addGoogleTagLogic --- addBannerDiv
userUpdatePay([userUpdatePay]) --> paymentHandler
userPaid -- pass JSON rule --> disableAd
click loadGoogleTagSDK "https://developers.google.com/publisher-tag/guides/get-started" "Google Publisher Tags"
Google Publisher Tags documentation
Debug messages are implemented via Debug lib
For enable CXF-AD-BANNER debug messages just run in a browser console
localStorage.debug = 'CXF-AD-BANNER:*'
To be able to test the project locally the easiest way is by using a proxy and forcing a redirect of the deployed code to the one compiled locally. To do that follow these steps:
Run the local project by running the npm run serve
in the root folder
It's going to give you a local link where the project is running. e.g. http://localhost:4005/index.js
Open the game (either staging or live)
Open the network tab in the dev tools and search for the json file where all the plugins are being listed (usually they are called {game}.json, e.g. empire.json or bigfarm.json) the content of the file will be something like this:
[
"<script src='https://hotpkg.com/@goodgamestudios/cxf-announcements@0.19.2/dist/announcements.js'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-events@1.21.1/dist/bigfarm.js'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-webshop@6.20.0/dist/webshop-cxf.js'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-tracking@production'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-error-handler@production'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-dialog@1.6.1'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-fullscreen@production'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-shop-zipcodes@production'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-ia@production/dist/bigfarm.js'></script>",
"<script src='https://hotpkg.com/@goodgamestudios/cxf-ad-banner@production/dist/index.js'></script>"
]
Identify the ad banner plugin link (in this case the last one), copy it and enter this link in the browser (it should redirect to another link and display a script code) the final link in this case will be something like this: https://cdn.jsdelivr.net/npm/@goodgamestudios/cxf-ad-banner@1.8.3/dist/index.js
Finally you can use this last link in the proxy application (e.g. https://app.requestly.io/) and point it to your local script
Now just reload the game page and your local script will be running
The project is being deployed to npm, so pay attention to not run the incorrect deploy script
It's already being deployed in the pipeline, so you might prefer to deploy there than running this local scripts:
ci:deploy:dev
ci:deploy:staging
ci:deploy:production
FAQs
Banners in GGS game frame
The npm package @goodgamestudios/cxf-banners receives a total of 14 weekly downloads. As such, @goodgamestudios/cxf-banners popularity was classified as not popular.
We found that @goodgamestudios/cxf-banners demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 27 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.