Last active
June 7, 2017 04:39
-
-
Save echr/bc8cb2799f04249f32c9b960ab12eaad to your computer and use it in GitHub Desktop.
Autoload Webview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/> | |
<title>Publisher Page</title> | |
<script async="" src="https://www.google-analytics.com/analytics.js"></script> | |
</head> | |
<body> | |
<!-- <h1>Publisher Test Page</h1> --> | |
<!-- <button id="mp-hook">THIS IS THE HOOK</button> --> | |
<noscript> | |
Javascript tidak aktif | |
</noscript> | |
<script id="mp-snippet"> | |
!function(a,b,c,d,e,f,g){a.MegahubsObject=e,a[e]=a[e]||function(){(a[e]._=a[e]._||[]) | |
.push(arguments)},a[e].$={start:1*new Date},f=b.createElement(c),g=b.getElementById("mp-snippet"),f.async=1,f.id="mp-widget", | |
f.src=d,g.parentNode.insertBefore(f,g)}(window,document,"script","https://d1npkqd2auelox.cloudfront.net/dist/mhsdk.js","MP"); | |
MP('init', 'PASTE_YOUR_APP_KEY', | |
PROVIDER: 'all', | |
PAYMENT: 'all', | |
PROVIDER_GAMES: 'all', | |
COLOR_THEME: 'green', | |
LAYOUT_THEME: 'white', | |
SHOW_NAVBAR: true, | |
TITLE_NAVBAR: 'Megahubs', | |
ENABLE_MODULE_PULSA: true, | |
ENABLE_MODULE_LISTRIK: true, | |
ENABLE_MODULE_GAMES: true, | |
FIRST_MODULE_TAB_INDEX: 1, | |
}); | |
MP('listen', 'widget.ready', function() { | |
console.log('ready'); | |
MP('openWidget'); | |
}); | |
MP('listen', 'widget.loaded', function() { | |
console.log('loaded'); | |
}); | |
MP('listen', 'widget.opened', function () { | |
console.log('opened'); | |
}); | |
MP('listen', 'widget.closed', function () { | |
console.log('closed'); | |
}); | |
MP('listen', 'transaction.success', function (response) { | |
console.log('finish'); | |
console.log(response); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Snippet ini menggunakan SDK versi terbaru (0.6.0). Jika Anda ingin menggunakan versi lama silahkan cek Webview SDK Lama