Commits

Nick Loadholtes committed c44e27a Draft

Using browser tag instead of iframe

  • Participants
  • Parent commits 12d9c70

Comments (0)

Files changed (3)

 var myForms = null;
 var storagekey = "QuickFormsUrls";
-var sampleFormUrl = '<iframe src="https://spreadsheets.google.com/embeddedform?formkey=dHBSNDkxTHJIQnluczgxR0tiQ0ZHaUE6MQ" \
-width="760" height="651" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>';
+var sampleFormUrl = '<browser src="https://spreadsheets.google.com/embeddedform?formkey=dHBSNDkxTHJIQnluczgxR0tiQ0ZHaUE6MQ" \
+width="760" height="651">Loading...</browser>';
 
 function size(obj) {
     var len = 0, key;
 }
     
 function calgonTakeMeAway(iframe) {
-    document.body.innerHTML = myForms[iframe];
+    document.querySelector("#display").style = "display:None;"
+    document.querySelector("#browserdiv").style = "display:block;"
+    // document.querySelector('browser').src = myForms[iframe];
+    document.querySelector('browser').width = "750";
+    document.querySelector('browser').height = "650";
 }
     
 function delUrl(indx) {
     "default_icon": "Note.png",
     "default_popup": "popup.html"
   },
-"content_security_policy": "iframe-src 'self' https://spreadsheets.google.com; object-src 'self'; script-src 'self'"
+"content_security_policy": "browser-src 'self' https://spreadsheets.google.com; object-src 'self'; script-src 'self'"
 }
 </style>
 
 <body>
+  <div id="browserdiv" style="display: None;">
+    <browser src="https://spreadsheets.google.com/embeddedform?formkey=dHBSNDkxTHJIQnluczgxR0tiQ0ZHaUE6MQ" width="760" height="650"></browser>
+  </div>
   <div id="display">
     <b>Quick Form</b>-<i>Your forms, quick</i>
     <div id='urllist'>