This method is suitable when you manage one webpage for STOVE only.
Make sure you have checked and prepared everything in Web Login
1. Import STOVE GNB Module
β’
You can script import STOVE GNB Module
1.1. Direct CDN Method
β’
You need to manually change the version info whenever the GNB is updated (current: v.6.3.27)
<script src="//js-cdn.onstove.com/libs/common-gnb/{version info}}/cp-header.js"></script>
JSON
볡μ¬
β’
Sample
<script src="//js-cdn.onstove.com/libs/common-gnb/20231120-1415-gnb-6.3.27/cp-header.js"></script>
JSON
볡μ¬
1.2. Automatic CDN Method
β’
This can keep the GNB at all times
β’
CDN Request URL :Β {νκ²½λ³ URL}/libs/common-gnb/latest/cp-header.js
β’
To check the newst semantic version: https://js-cdn.onstove.com/libs/common-gnb/latest/version.txt
2. Option settings for GNB
var options = {
wrapper: '.wrapper',
skin: 'gnb-default',
widget: {
gameListAndService: false
},
global: {
useGds: true
},
loginMethod: {
params: {
inflow_path: 'tr',
redirect_url: Common.Http.Portal + "/member/simpleuserlogout.asp?u="+Base64LoginUrl.encode(location.href)+"&change_type=n",
game_no: '2', // change game_no per environment (live, sb)
show_play_button:'Y',
},
redirectCurrentPage: false
},
onCreatedHeaderElement: function(headerElement) {
console.log(headerElement);
}
// gnb width, z-index css needs to be prepared separately (use .gnb-stove.gnb-default-mini)
};
var cpHeader = new window.cp.Header(options);
cpHeader.render();
JavaScript
볡μ¬
3. Use id in html to Apply GNB
<div id="stoveGnb" class="gnb-stove gnb-camp">
::before
<div class="gnb-inner">
..........
HTML
볡μ¬