Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. function connectWebViewJavascriptBridge(callback) {
  2. if (window.WebViewJavascriptBridge) {
  3. callback(WebViewJavascriptBridge)
  4. } else {
  5. document.addEventListener(
  6. 'WebViewJavascriptBridgeReady'
  7. , function() {
  8. callback(WebViewJavascriptBridge)
  9. },
  10. false
  11. );
  12. }
  13. }
  14. connectWebViewJavascriptBridge(function(bridge) {
  15. bridge.init(function(message, responseCallback) {
  16. var sgf = new String(message);
  17.  
  18. GoBoardApi.Load_Sgf(oGameTree, sgf);
  19. GoBoardApi.Update_Size(oGameTree);
  20. window.onresize = function () {
  21. GoBoardApi.Update_Size(oGameTree);
  22. };
  23. document.title = GoBoardApi.Get_MatchName(oGameTree);
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement