Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bywarmx authored Aug 4, 2024
1 parent 767055b commit a95184d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$(document).ready(function () {
var gen = "kfc";
document.title = gen + " Generator";
$("#bot").text(gen);

$("#generar").click(function () {
var cant = $("#cant").val();
var dias = $("#dias").val();
var fol = $("#folio").val();
var year = $("#fecha").val();
var tienda = $("#tienda").val();
var fech = $("#dias option:selected").text();
var shop = $("#tienda option:selected").text();

$("#datos").text("");
var p= $("#folio").val();
for (var i = 1; i <= cant; i++) {
$("#datos").append(gen+"|" + tienda + rnd(0, 5) + fol + rnd(0, 9) + rnd(0, 9) + year + dias + rnd(0, 9) + rnd(0, 9) +"|"+ fech +"|" + shop.replace(/ /g,"_") +"\n");
}
});



});

function rnd(x, a) {
return Math.floor(Math.random() * (a + 1 - x)) + x
}

function copiarAlPortapapeles(id_elemento) {
var input = document.getElementById(id_elemento);
input.select();
document.execCommand("copy");
}

0 comments on commit a95184d

Please sign in to comment.