Skip to content

Instantly share code, notes, and snippets.

@normanzb
Last active December 29, 2015 18:26
Show Gist options
  • Save normanzb/65b22cd10136b3425018 to your computer and use it in GitHub Desktop.
Save normanzb/65b22cd10136b3425018 to your computer and use it in GitHub Desktop.
javascript:(function()%7Bvar%20iframe%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3Bif%20(!iframe)%20return%3Biframe.src%3D%22javascript%3Avoid%20(function()%7Bdocument.documentElement.style.overflow%3D'hidden'%3Bdocument.domain%3D'englishtown.com'%3B%7D)()%22%3Bvar%20require%20%3D%20iframe.contentWindow.require%3Bvar%20window%20%3D%20iframe.contentWindow%3Bvar%20name%3Dwindow.prompt('Name%3F')%3Brequire(%5B%22dojo%22%2C%22dijit%2Fdijit%22%5D%2C%20function%20()%20%7Bvar%20ctl%20%3D%20window.dijit.byId(%22dijit_form_Select_1%22)%3Bvar%20opt%20%3D%20ctl.options%5B0%5D%3Bopt.value%20%3D%20name%3Bopt.label%20%3D%20name%3Bctl.setValue(name)%3B%7D)%7D)()
var iframe = document.getElementsByTagName('iframe')[0];
if (!iframe) return;
iframe.src="javascript:void (function(){document.documentElement.style.overflow='hidden';document.domain='englishtown.com';})()";
var require = iframe.contentWindow.require;
var window = iframe.contentWindow;
var name=window.prompt('Name?');
require(["dojo","dijit/dijit"], function () {
var ctl = window.dijit.byId("dijit_form_Select_1");
var opt = ctl.options[0];
opt.value = name;
opt.label = name;
ctl.setValue(name);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment