Skip to content

Instantly share code, notes, and snippets.

@lebaz20
lebaz20 / app.js
Last active November 16, 2019 17:55
var script = document.currentScript;
var token = script.getAttribute('data-token');
var bgdColor = script.getAttribute('data-bgd-color');
var textColor = script.getAttribute('data-text-color');
console.log('location.href', location.href)
var iframe = document.createElement('iframe');
iframe.frameBorder = "0";
iframe.src = 'child.html?token=' + token + '&bgd-color=' + bgdColor + '&text-color=' + textColor;
document.body.appendChild(iframe);

Keybase proof

I hereby claim:

  • I am lebaz20 on github.
  • I am mohamedlabib (https://keybase.io/mohamedlabib) on keybase.
  • I have a public key ASA3USRpom0CXeKzOfQdR0tBa2WI_4lB5SKnZvwfKDxF4go

To claim this, I am signing this object:

@lebaz20
lebaz20 / 0_reuse_code.js
Created August 5, 2014 00:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console