Skip to content
Browse files

Remove the mozbrowser security

  • Loading branch information...
1 parent 174b6e4 commit d1e7a5f06346091a5654cfdeaffc9775fa97e96a @vingtetun committed Jul 10, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −2 apps/homescreen/js/grid.js
  2. +4 −1 apps/homescreen/js/homescreen.js
View
3 apps/homescreen/js/grid.js
@@ -437,8 +437,7 @@ const GridManager = (function() {
var iframe = document.createElement('iframe');
iframe.className = 'search';
- iframe.setAttribute('mozbrowser', 'mozbrowser');
- iframe.src = 'http://b2g.stg.everything.me';
+ iframe.src = 'http://b2g.everything.me';
container.appendChild(iframe);
},
/*
View
5 apps/homescreen/js/homescreen.js
@@ -24,7 +24,8 @@ const Homescreen = (function() {
// system application. It should be an activity that will
// use the system message API.
window.addEventListener('message', function onMessage(e) {
- switch (e.data) {
+ var mode = 'type' in e.data ? e.data.type : e.data;
+ switch (mode) {
case 'home':
if (GridManager.isEditMode()) {
GridManager.setMode('normal');
@@ -36,12 +37,14 @@ const Homescreen = (function() {
case 'open-in-app':
// Needs to add a frame on the left side
var url = e.data.url;
+ dump('====================' + url + '\n');
break;
case 'add-bookmark':
// Add a new bookmark to the homescreen
var title = e.data.title;
var url = e.data.url;
var icon = e.data.icon;
+ dump('====================' + title + '\n' + url + '\n' + icon + '\n');
break;
}
});

0 comments on commit d1e7a5f

Please sign in to comment.
Something went wrong with that request. Please try again.