tes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Generates emails from a single Gmail username">
<meta name="author" content="lamlam">
<title>Gmail Dot Trick Generator</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style>body{font-family:'Roboto',sans-serif;}.panel-red{border:1px solid #315888;margin:5px 0;border-top-left-radius:0;border-top-right-radius:0;}.panel-red>.panel-heading{background-color:#315888;;color:#fff;text-align:center;font-weight:bold;font-size:17px;}.panel-red>.panel-footer{background-color:#f1f1f1;}.btn{margin-left:5px;}.btn-teal{background-color:#00b5ad;color:#fff;}.btn-teal:hover,.btn-teal:active,.btn-teal:focus{background-color:#009c95;color:#fff;}.btn-green{background-color:#21ba45;color:#fff;}.btn-green:hover,.btn-green:active,.btn-green:focus{background-color:#16ab39;color:#fff;}textarea{resize:none;}</style>
<script>
(function($) {
"use strict";
var namespace = 'rippler';
var methods = {
init: function(options){
options = $.extend({
effectClass : 'rippler-effect'
,effectSize : 16 // Default size (width & height)
,addElement : 'div' // e.g. 'svg' (feature)
,duration : 600
}, options);
return this.each(function(){
var _this = this;
var $this = $(this);
var data = $this.data(namespace);
if (!data) {
options = $.extend({}, options);
$this.data(namespace, {
options: options
});
if (typeof document.ontouchstart != "undefined") {
$this.on("touchstart."+ namespace, function(event) {
var $self = $(this);
methods.elementAdd.call(_this, $self, event);
});
$this.on("touchend." + namespace, function(event) {
var $self = $(this);
methods.effect.call(_this, $self, event);
});
}else{
$this.on("mousedown."+ namespace, function(event) {
var $self = $(this);
methods.elementAdd.call(_this, $self, event);
});
$this.on("mouseup."+ namespace, function(event) {
var $self = $(this);
methods.effect.call(_this, $self, event);
});
}
}
}); // end each
},
template: function(options){
var $this = $(this);
options = $this.data(namespace).options;
var element;
var svgElementClass = 'rippler-svg';
var divElementClass = 'rippler-div';
var circle = '<circle cx="'+options.effectSize+'" cy="'+options.effectSize+'" r="'+(options.effectSize / 2)+'">';
var svgElement = '<svg class="'+options.effectClass+' '+svgElementClass+'" xmlns="http://www.w3.org/2000/svg" viewBox="'+(options.effectSize / 2)+' '+(options.effectSize / 2)+' '+options.effectSize+' '+options.effectSize+'">'+circle+'</svg>';
var divElement = '<div class="'+options.effectClass+' '+divElementClass+'"></div>';
if (options.addElement === 'svg'){
element = svgElement;
} else {
element = divElement;
}
return element;
},
elementAdd: function($self, event, options){
var _this = this;
var $this = $(this);
options = $this.data(namespace).options;
$self.append(methods.template.call(_this));
var $effect = $self.find('.' + options.effectClass);
var selfOffset = $self.offset();
var eventX = methods.targetX.call(_this,event);
var eventY = methods.targetY.call(_this,event);
$effect.css({
'width':options.effectSize
,'height':options.effectSize
,'left': ( eventX - selfOffset.left ) - ( options.effectSize / 2 )
,'top': ( eventY - selfOffset.top ) - ( options.effectSize / 2 )
});
return _this;
},
effect : function($self, event, options){
var _this = this;
var $this = $(this);
options = $this.data(namespace).options;
var $effect = $('.' + options.effectClass);
var selfOffset = $self.offset();
var thisW = $this.outerWidth();
var thisH = $this.outerHeight();
var effectMaxWidth = methods.diagonal(thisW, thisH) * 2;
var eventX = methods.targetX.call(_this,event);
var eventY = methods.targetY.call(_this,event);
$effect.css({
'width':effectMaxWidth
,'height':effectMaxWidth
,'left': ( eventX - selfOffset.left ) - ( effectMaxWidth / 2 )
,'top': ( eventY - selfOffset.top ) - ( effectMaxWidth / 2 )
,'transition':'all '+ ( options.duration / 1000 ) +'s ease-out'
});
return methods.elementRemove.call(_this);
},
elementRemove: function(options){
var _this = this;
var $this = $(this);
options = $this.data(namespace).options;
var $effect = $('.' + options.effectClass);
setTimeout(function(){
$effect.css({
'opacity': 0
,'transition':'all '+ ( options.duration / 1000 ) +'s ease-out'
});
setTimeout(function(){
$effect.remove();
}, options.duration * 1.5);
}, options.duration);
return _this;
},
targetX: function(event){
var e = event.originalEvent;
var eventX;
if (typeof document.ontouchstart != "undefined") {
eventX = e.changedTouches[0].pageX;
}else{
eventX = e.pageX;
}
return eventX;
},
targetY: function(event){
var e = event.originalEvent;
var eventY;
if (typeof document.ontouchstart != "undefined") {
eventY = e.changedTouches[0].pageY;
}else{
eventY = e.pageY;
}
return eventY;
},
diagonal: function(x, y){
if (x > 0 && y > 0) return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
else return false;
},
destroy: function(){
return this.each(function(){
var $this = $(this);
$(window).unbind('.'+namespace);
$this.removeData(namespace);
});
}
};
$.fn.rippler = function(method){
if ( methods[method] ) {
return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if ( typeof method === 'object' || ! method ) {
return methods.init.apply( this, arguments );
} else {
$.error( 'Method ' + method + ' does not exist on jQuery.'+namespace);
}
};
})(jQuery);
(function($){
$(".btn").rippler({
effectClass : 'rippler-effect'
,effectSize : 16 // Default size (width & height)
,addElement : 'div' // e.g. 'svg'(feature)
,duration : 400
});
})(jQuery);
</script>
<script>
var worker = new Worker('worker.js');
var count = 0;
function startGenerating() {
worker.terminate();
count = 0;
worker = new Worker('worker.js');
//Clear the text area
var emails = $("#emails");
emails.val("");
var username = $("#username").val();
var combinations = Math.pow(2, username.length - 1);
if (username.length == 0) {
$("#counter").text("Generated: 0");
return;
}
worker.onmessage = function(event) {
count++;
emails.val(emails.val() + event.data);
$("#counter").text("Generated: " + commafy(count));
if(count == combinations) {
emails.val($.trim(emails.val()));
}
};
worker.postMessage(username);
}
function commafy(num) {
var parts = ('' + num),
s = parts,
i = L = s.length,
o = '',
c;
while (i--) {
o = (i == 0 ? '' : ((L - i) % 3 ? '' : ',')) + s.charAt(i) + o
}
return o
}
$(document).ready(function() {
$("#username").on('input', function() {
startGenerating();
});
});
</script>
<script>
function saveTextAsFile() {
var textToWrite = document.getElementById('emails').value;
var textFileAsBlob = new Blob([textToWrite], {
type: 'text/plain'
});
var username = $("#username").val();
var fileNameToSaveAs = username + ".txt";
var downloadLink = document.createElement("a");
downloadLink.download = fileNameToSaveAs;
downloadLink.innerHTML = "Save";
if (window.webkitURL != null) {
// Chrome allows the link to be clicked
// without actually adding it to the DOM.
downloadLink.href = window.webkitURL.createObjectURL(textFileAsBlob);
} else {
// Firefox requires the link to be added to the DOM
// before it can be clicked.
downloadLink.href = window.URL.createObjectURL(textFileAsBlob);
downloadLink.onclick = destroyClickedElement;
downloadLink.style.display = "none";
document.body.appendChild(downloadLink);
}
downloadLink.click();
}
</script>
</head>
<body>
<div class="container">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-red">
<div class="panel-heading">
<div class="panel-title">
<i class="fa fa-google"></i> Gmail Dot Trick Generator
</div>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label for="username" class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<div class="input-group">
<input id="username" name="username" class="form-control" placeholder="" type="text" maxlength="20" required="">
<span class="input-group-addon">@gmail.com</span>
</div>
</div>
</div>
<div class="form-group">
<label for="emails" class="col-sm-12">
Emails
<span class="pull-right" id="counter">Generated: 0</span>
</label>
<div class="col-sm-12">
<textarea rows="16" id="emails" name="emails" class="form-control"></textarea>
</div>
</div>
<div class="control-group">
<div class="controls">
<button id="button" name="button" class="btn btn-teal pull-right" onclick="startGenerating(); return false;"><i class="fa fa-cog fa-spin"></i> Generate</button>
<a id="save" name="save" class="btn btn-green pull-right" onclick="saveTextAsFile(); return false;"><i class="fa fa-save"></i> Save</a>
</div>
</div>
</form>
</div>
<div class="panel-footer">Made by <a href="http://thebot.net/members/lamlam.958/">lamlam</a> for TBN. CSS by <a href="https://www.redditgifts.com/exchanges/redditgifts-teachers-2015/"> Jasko Koyn</a>.</div>
</div>
</div>
</div>
</body>
</html>