Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function connectWebViewJavascriptBridge(callback) {
- if (window.WebViewJavascriptBridge) {
- callback(WebViewJavascriptBridge)
- } else {
- document.addEventListener(
- 'WebViewJavascriptBridgeReady'
- , function() {
- callback(WebViewJavascriptBridge)
- },
- false
- );
- }
- }
- connectWebViewJavascriptBridge(function(bridge) {
- bridge.init(function(message, responseCallback) {
- var sgf = new String(message);
- GoBoardApi.Load_Sgf(oGameTree, sgf);
- GoBoardApi.Update_Size(oGameTree);
- window.onresize = function () {
- GoBoardApi.Update_Size(oGameTree);
- };
- document.title = GoBoardApi.Get_MatchName(oGameTree);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement