Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1028423 // BookBetter Load Chat Bot In Parent Of IFrame

Document

function dynamicallyLoadScriptIn(url, document) {
  var script = document.createElement("script");
  script.src = url;
  document.head.appendChild(script);
}
  
console.log("parent: " + parent);
console.log("parent location: " + parent.document.location);

dynamicallyLoadScriptIn("https://code.jquery.com/jquery-1.10.2.js", parent.document);
dynamicallyLoadScriptIn("https://botcompany.de/1028422/raw?rand=" + Math.random(), parent.document);

console.log("loaded scripts");

Author comment

Began life as a copy of #1026227

download  show line numbers   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028423
Snippet name: BookBetter Load Chat Bot In Parent Of IFrame
Eternal ID of this version: #1028423/3
Text MD5: f91acdb6b3b38acf347886598a61e283
Author: stefan
Category: javascript
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-18 00:06:27
Source code size: 487 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 99 / 1130
Version history: 2 change(s)
Referenced in: [show references]