2023-07-05 15:55:12 +01:00
<!DOCTYPE html>
2023-07-06 10:06:46 +01:00
< html class = "" lang = "en-US" >
2023-07-05 15:55:12 +01:00
< head >
< meta http-equiv = "content-type" content = "text/html; charset=UTF-8" >
< meta name = "theme-color" content = "#075aae" >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< link rel = "profile" href = "https://gmpg.org/xfn/11" >
< meta name = "description" content = "Create a list of names and spin the wheel to choose one random winner. Share your created wheel with others. Simple, easy, and for free!" >
< meta name = "robots" content = "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" >
< link media = "all" href = "autoptimize_62cbd689f055653f750a3761c62266a5.css" rel = "stylesheet" >
< link media = "all" href = "confetti.css" rel = "stylesheet" >
< script src = "autoptimize_single_9743799a180fad60fedd8b073509f90b.js" id = "custom-Win-wheel-js" > < / script >
< script src = "cori.js" id = "cori.js" > < / script >
< / head >
< body data-rsssl = "1" itemtype = "https://schema.org/WebPage" itemscope = "itemscope" class = "home page-template page-template-spin-wheel-template page-template-spin-wheel-template-php page page-id-22 wp-custom-logo ehf-footer ehf-template-astra ehf-stylesheet-astra-child ast-desktop ast-page-builder-template ast-no-sidebar astra-3.0.2 ast-header-custom-item-inside ast-single-post ast-inherit-site-logo-transparent elementor-default elementor-kit-517 elementor-page elementor-page-22 e--ua-firefox ast-mouse-clicked" style = "" data-elementor-device-mode = "widescreen" > < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 0 0" width = "0" height = "0" focusable = "false" role = "none" style = "visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" > < defs > < filter id = "wp-duotone-dark-grayscale" > < feColorMatrix color-interpolation-filters = "sRGB" type = "matrix" values = " .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " > < / feColorMatrix > < feComponentTransfer color-interpolation-filters = "sRGB" > < feFuncR type = "table" tableValues = "0 0.49803921568627" > < / feFuncR > < feFuncG type = "table" tableValues = "0 0.49803921568627" > < / feFuncG > < feFuncB type = "table" tableValues = "0 0.49803921568627" > < / feFuncB > < feFuncA type = "table" tableValues = "1 1" > < / feFuncA > < / feComponentTransfer > < feComposite in2 = "SourceGraphic" operator = "in" > < / feComposite > < / filter > < / defs > < / svg > < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 0 0" width = "0" height = "0" focusable = "false" role = "none" style = "visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" > < defs > < filter id = "wp-duotone-grayscale" > < feColorMatrix color-interpolation-filters = "sRGB" type = "matrix" values = " .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " > < / feColorMatrix > < feComponentTransfer color-interpolation-filters = "sRGB" > < feFuncR type = "table" tableValues = "0 1" > < / feFuncR > < feFuncG type = "table" tableValues = "0 1" > < / feFuncG > < feFuncB type = "table" tableValues = "0 1" > < / feFuncB > < feFuncA type = "table" tableValues = "1 1" > < / feFuncA > < / feComponentTransfer > < feComposite in2 = "SourceGraphic" operator = "in" > < / feComposite > < / filter > < / defs > < / svg > < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 0 0" width = "0" height = "0" focusable = "false" role = "none" style = "visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" > < defs > < filter id = "wp-duotone-purple-yellow" > < feColorMatrix color-interpolation-filters = "sRGB" type = "matrix" values = " .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " > < / feColorMatrix > < feComponentTransfer color-interpolation-filters = "sRGB" > < feFuncR type = "table" tableValues = "0.54901960784314 0.98823529411765" > < / feFuncR > < feFuncG type = "table" tableValues = "0 1" > < / feFuncG > < feFuncB type = "table" tableValues = "0.71764705882353 0.25490196078431" > < / feFuncB > < feFuncA type = "table" tableValues = "1 1" > < / feFuncA > < / feComponentTransfer > < feComposite in2 = "SourceGraphic" operator = "in" > < / feComposite > < / filter > < / defs > < / svg > < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 0 0" width = "0" height = "0" focusable = "false" role = "none" style = "visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" > < defs > < filter id = "wp-duotone-blue-red" > < feColorMatrix color-interpolation-filters = "sRGB" type = "matrix" values = " .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 " > < / feColorMatrix > < feComponentTransfer color-interpolation-filters = "sRGB" > < feFuncR type = "table" tableValues = "0 1" > < / feFuncR > < feFuncG type = "table" tableValues = "0 0.27843137254902" > < / feFuncG > < feFuncB type = "table" tableValues = "0.5921568627451 0.27843137254902" > < / feFuncB > < feFuncA type = "table" tableValues = "1 1" > < / feFuncA > < / feComponentTransfer > < feComposite in2 = "SourceGraphic" operator = "in" > < / feComposite > < / filter > < / defs > < / svg > < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 0 0" width = "0" height = "0" focusable = "false" role = "none" style = "visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" > < defs > < filter id = "wp-duotone-midnight" > < feColorMatrix color-interpolation-filters = "sRGB" type = "matrix" values = " . 299 . 587 . 114 0 0 . 299 . 587 . 114 0 0
< div class = "hfeed site" id = "page" >
< header class = "site-header header-main-layout-1 ast-primary-menu-enabled ast-logo-title-inline ast-hide-custom-menu-mobile ast-menu-toggle-icon ast-mobile-header-inline" id = "masthead" itemtype = "https://schema.org/WPHeader" itemscope = "itemscope" itemid = "#masthead" >
< / div >
< / header >
2023-07-06 10:06:46 +01:00
< div id = "content" class = "site-content"
>
2023-07-05 15:55:12 +01:00
< div class = "ast-container" >
< div id = "content" class = "site-content" data-aos = "fade-in" >
< div class = "ast-container" >
< div id = "primary" class = "content-area primary" >
< main id = "main" class = "site-main" >
< div class = "wheel-container" id = "wheel-container" >
< div class = "wheel-section" align = "center" >
< div class = "wheel-arrow" > < noscript > < img alt = "Wheel arrow" src = "arrow.png" srcset = "arrow-small.png 37w" sizes = "37px" > < / noscript > < img class = " lazyloaded" alt = "Wheel arrow" src = "arrow.png" data-src = "arrow.png" data-srcset = "arrow-small.png 37w" data-sizes = "37px" sizes = "37px" srcset = "arrow-small.png 37w" > < / div > < canvas id = "canvas" class = "wheel-image" data-responsiveminwidth = "180" data-responsivescaleheight = "true" onclick = "startSpin();" width = "1000" height = "1000" > < p style = "{color: white}" align = "center" > Sorry, your browser doesn't support canvas. Please try another.< / p > < / canvas > < / div >
< div class = "wheel-tab-section" style = "visibility: hidden;" >
< div class = "toggle" >
< div class = "tabs" >
< div class = "tab active" > Entries< / div >
< div class = "tab" > Results< / div >
< / div >
< div class = "panels" >
< div class = "panel" > < label > < textarea name = "enter-names" class = "enter-names" id = "add-names" rows = "10" >
Horny
2023-07-06 10:06:46 +01:00
Punti
Punti
Egodeath
2023-07-05 15:55:12 +01:00
Pappagallo
Gemello
Desiderio
2 Desideri
Schiavo
2023-07-06 10:06:46 +01:00
Niente nomi
Trivia
Punti
2023-07-05 15:55:12 +01:00
Complimento
Strip
Flessioni
2023-07-06 10:06:46 +01:00
Bevi
Punti
2023-07-05 15:55:12 +01:00
Scelte sbagliate
2023-07-06 10:06:46 +01:00
Schiavo
2023-07-05 15:55:12 +01:00
Coro
Selfie
Sexy selfie
Vocalino
USA
2023-07-06 10:06:46 +01:00
Culo al muro
Bevi
Verità
2023-07-05 15:55:12 +01:00
< / textarea > < / label > < / div >
< div class = "panel" >
< div class = "results-list" >
< table style = "width: 100%;" border = "1" >
< thead >
< tr >
< th > #< / th >
< th > Name< / th >
< / tr >
< / thead >
< tbody id = "winner-table" >
< tr >
< td > #1< / td >
< td > Adam< / td >
< / tr >
< tr >
< td > #2< / td >
< td > James< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< / div >
< / div > < button id = "spin_button" onclick = "startSpin();" alt = "Spin wheel" > Spin< / button > < button onclick = "resetWheel(); return false;" alt = "Reset wheel" > Reset< / button > < button id = "custom_share" onclick = "custom_share();" href = "" class = "a2a_dd addtoany_no_icon addtoany_share_save addtoany_share custom-share-link" alt = "Share wheel" > Share< / button > < / div >
< div class = "wheel-tab-section" > < label > Sound : < / label > < label class = "switch" > < input type = "checkbox" id = "checkbox_check_uncheck" onclick = "checkbox_check_uncheck();" checked = "checked" > < span class = "slider round" > < / span > < / label >
< / div >
< / div >
< div style = 'visibility: hidden' >
< canvas class = "confetti" id = "confetti" > < / canvas >
< / main >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / section >
< / div >
< / div >
< / div >
< / footer >
< / div >
< div class = "code-block code-block-1" style = "margin: 8px 0; clear: both;" >
< div id = "wheelgenerator_com_320x100_anchor_mobile" >
< / div >
< / div >
< script src = "jquery.min.js" id = "jquery-Win-wheel-js" > < / script >
< script src = "TweenMax.min.js" id = "tween max-js" > < / script >
< script type = "text/javascript" src = "jquery.cookie.min.js" > < / script >
< script >
function resetPlayerNames() {
sessionStorage.setItem("win_while_players", []);
}
function storePlayerNames(name) {
var player_name = [];
if (sessionStorage.getItem("win_while_players") & & sessionStorage.getItem("win_while_players").length > 0) {
player_name = JSON.parse(sessionStorage.getItem("win_while_players"));
player_name.push(name);
}else{
player_name = [name];
}
sessionStorage.setItem("win_while_players", JSON.stringify(player_name));
}
function storeWinnerName(name) {
var winners_name = [];
winners_name = JSON.parse(sessionStorage.getItem("win_while_winners"));
if (winners_name & & winners_name.length > 0) {
winners_name.push(name);
}else{
winners_name = [name];
}
sessionStorage.setItem("win_while_winners", JSON.stringify(winners_name));
}
function updatePlayerTable(){
if (sessionStorage.getItem("win_while_players")!='' & & sessionStorage.getItem("win_while_players")!=null) {
var PlayerList = JSON.parse(sessionStorage.getItem("win_while_players"));
// console.log(PlayerList);
var playes_names = '';
for (var i = 0; i < PlayerList.length ; i + + ) {
playes_names += PlayerList[i]+'\n';
}
// console.log(playes_names);
$("#add-names").val(playes_names);
}else{
var url = window.location.href;
var get_para = url.split('?session=').pop();
var get_session_id = get_para.substring(0,16);
// alert(get_para);
$("#add-names").val('Roberto\nIeso\nGiulia');
}
$("#add-names").trigger('keyup');
}
function getNumberOfPlayers() {
var numOfPlayer = 0;
var p_array = $('#add-names').val().split('\n');
for (var i = 0; i < p_array.length ; i + + ) {
if (p_array[i]) {
numOfPlayer++;
}
}
return numOfPlayer;
}
function getColorForNextSegment(segmentColor) {
switch(segmentColor) {
case '#FBFFEB':
return '#70C1B3';
break;
case '#70C1B3':
return '#B2DABF';
case '#B2DABF':
return '#F3FFBD';
case '#F3FFBD':
return '#E94957';
case '#E94957':
return '#FBFFEB';
break;
default:
return '#FBFFEB';
}
}
var defaultColors = ['#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957', '#FBFFEB', '#70C1B3', '#B2DABF', '#F3FFBD', '#E94957'];
var defaultSegmentValues = [];
$.each($('#add-names').val().split('\n'), function(i){
defaultSegmentValues.push({'fillStyle' : defaultColors[i], 'text' : this});
});
// Create new wheel object specifying the parameters at creation time.
let theWheel = new Winwheel({
'numSegments' : getNumberOfPlayers(), // Specify number of segments.
'textFontSize' : 35, // Set font size as desired.
'textFontFamily' : 'Inter',
// 'outerRadius' : 212, // Set radius to so wheel fits the background.
'innerRadius' : 60, // Set inner radius to make wheel hollow.
'responsive' : true, // This wheel is responsive!
'strokeStyle' : '#828282',
'segments' : defaultSegmentValues, // Define segments including colour and text.
'animation' : // Specify the animation to use.
{
'type' : 'spinToStop',
'duration' : 5, // Duration in seconds.
'spins' : 6, // Number of complete spins.
'callbackFinished' : alertPrize,
'callbackSound' : playSound, // Function to call when the tick sound is to be triggered.
'soundTrigger' : 'pin' // Specify pins are to trigger the sound, the other option is
},
'pins' :
{
'number' : 5 // Number of pins. They space evenly around the wheel.
}
});
// -----------------------------------------------------------------
// This function is called when the segment under the prize pointer changes
// we can play a small tick sound here like you would expect on real prizewheels.
// -----------------------------------------------------------------
let audio = new Audio('tick.mp3'); // Create audio object and load tick.mp3 file.
function playSound()
{
// Stop and rewind the sound if it already happens to be playing.
audio.pause();
audio.currentTime = 0;
// Play the sound.
audio.play();
}
// Vars used by the code in this page to do power controls.
let wheelPower = 0;
let wheelSpinning = false;
// -------------------------------------------------------
// Click handler for spin button.
// -------------------------------------------------------
function startSpin()
{
// Ensure that spinning can't be clicked again while already running.
if (wheelSpinning == false) {
// Based on the power level selected adjust the number of spins for the wheel, the more times is has
// to rotate with the duration of the animation the quicker the wheel spins.
if (wheelPower == 1) {
theWheel.animation.spins = 3;
} else if (wheelPower == 2) {
theWheel.animation.spins = 8;
} else if (wheelPower == 3) {
theWheel.animation.spins = 15;
}
// Disable the spin button so can't click again while wheel is spinning.
//document.getElementById('spin_button').src = "";
//document.getElementById('spin_button').className = "";
// Begin the spin animation by calling startAnimation on the wheel object.
theWheel.startAnimation();
// Set to true so that power can't be changed and spin button re-enabled during
// the current animation. The user will have to reset before spinning again.
wheelSpinning = true;
}
}
// -------------------------------------------------------
// Function for reset button.
// -------------------------------------------------------
function resetWheel()
{
var r = confirm("Are you sure want to reset results and names?");
if (r == true) {
theWheel.stopAnimation(false); // Stop the animation, false as param so does not call callback function.
theWheel.rotationAngle = 0; // Re-set the wheel angle to 0 degrees.
theWheel.draw(); // Call draw to render changes to the wheel.
wheelSpinning = false; // Reset to false to power buttons and spin can be clicked again.
// Reset winner name and entries
sessionStorage.removeItem("win_while_players");
sessionStorage.removeItem("win_while_winners");
$("#winner-table").html('');
$("#add-names").val('');
// resetPlayerNames();
updatePlayerTable();
updateWinnerTable();
// show spin on button
//document.getElementById('spin_button').src = "";
// window.location.href = 'https://wheelgenerator.com';
} else {
return false;
}
}
// -------------------------------------------------------
// Called when the spin animation has finished by the callback feature of the wheel because I specified callback in the parameters
// note the indicated segment is passed in as a parmeter as 99% of the time you will want to know this to inform the user of their prize.
// -------------------------------------------------------
function coro(){
var randomIndex = Math.floor(Math.random() * numAudioFiles);
// Get the randomly selected audio from the array
var c = audioFiles[randomIndex];
// Play the audio
c.play();
}
document.addEventListener("keydown", function(event) {
if (event.code === "Space") {
// Call your function here
startSpin();
}
});
function alertPrize(indicatedSegment)
{
audio.pause();
audio.currentTime = 0;
// code for reset button after alert price
theWheel.stopAnimation(false);
theWheel.rotationAngle = 0;
// theWheel.draw();
wheelSpinning = false;
<!-- alert("DONE"); -->
renderAnimation();
coro();
//document.getElementById('spin_button').src = "";
}
function custom_share($)
{
var get_name = jQuery('#add-names').val();
var url = window.location.href;
var get_para = url.split('?session=').pop();
var get_session_id = get_para.substring(0,16);
jQuery.ajax({
type: 'POST',
url: 'https://localhost',
data:{
action : 'insert_records',
w_name : get_name,
s_number : get_session_id
},
success: function( data ){
var session_number = data.data['session_number'];
var session_number_pass_para = '?session='+session_number;
window.location.hash = session_number_pass_para;
}
});
}
function checkbox_check_uncheck($)
{
if (jQuery('#checkbox_check_uncheck').is(':checked') == true) {
var cok_Set = jQuery.cookie("Sound_status", "volume_on");
}
else
{
var cok_Set = jQuery.cookie("Sound_status", "volumn_off");
}
}
< / script >
< script >
(function() {
$( ".a2a_dd" ).mouseenter(function() {
$(".a2a_mini_services").hide();
$(".a2apage_wide.a2a_wide").hide();
$(".a2a_menu").css("border","0");
});
var get_cookie = jQuery.cookie("Sound_status");
if(get_cookie == 'volumn_off')
{
jQuery('#checkbox_check_uncheck').prop('checked', false);
}
else if (get_cookie == 'volume_on')
{
jQuery('#checkbox_check_uncheck').prop('checked', true);
}
$("#add-names").keydown(function(event) {
if (event.keyCode==8) {
if ($(this).val().split('\n').length < = 2) {
alert('A minimum of 2 names is required!');
return false;
}
}
});
$("#add-names").keyup(function (e) {
var code = (e.keyCode ? e.keyCode : e.which);
var name = $(this).val();
var lines = name.split('\n');
var fillStyle = [ '#e63946', '#f1faee', '#a8dadc', '#457b9d', '#1d3557' ];
if (code == 13 || 1==1)
{
var final_theWheel_numSegments = theWheel.numSegments;
for (var i = 1; i < = final_theWheel_numSegments; i++) {
theWheel.deleteSegment(i);
theWheel.updateSegmentSizes();
theWheel.draw();
}
var firstFillColor = theWheel.segments[theWheel.numSegments].fillStyle;
// add new item to wheel
resetPlayerNames();
$.each(lines, function(key_num){
console.log('aa - '+this+' -- '+key_num);
if (this!=null & & this!='') {
theWheel.addSegment({
'textFontFamily' : 'Inter',
'text' : this,
'fillStyle' : (key_num==0) ? defaultColors[0] : getColorForNextSegment(theWheel.segments[theWheel.numSegments].fillStyle)
});
theWheel.updateSegmentSizes();
theWheel.draw();
storePlayerNames(this);
}
});
theWheel.deleteSegment(1);
theWheel.updateSegmentSizes();
theWheel.draw();
}
// jQuery('.custom-share-link').css('opacity','0.4');
// jQuery('.custom-share-link').css('pointer-events','none');
});
$(function() {
var toggle;
return toggle = new Toggle('.toggle');
});
this.Toggle = (function() {
Toggle.prototype.el = null;
Toggle.prototype.tabs = null;
Toggle.prototype.panels = null;
function Toggle(toggleClass) {
this.el = $(toggleClass);
this.tabs = this.el.find(".tab");
this.panels = this.el.find(".panel");
this.bind();
}
Toggle.prototype.show = function(index) {
var activePanel, activeTab;
this.tabs.removeClass('active');
activeTab = this.tabs.get(index);
$(activeTab).addClass('active');
this.panels.hide();
activePanel = this.panels.get(index);
return $(activePanel).show();
};
Toggle.prototype.bind = function() {
var _this = this;
return this.tabs.unbind('click').bind('click', function(e) {
return _this.show($(e.currentTarget).index());
});
};
return Toggle;
})();
}).call(this);
function nl2br (str, replaceMode, isXhtml) {
var breakTag = (isXhtml) ? '< br / > ' : '< br > ';
var replaceStr = (replaceMode) ? '$1'+ breakTag : '$1'+ breakTag +'$2';
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, replaceStr);
}
< / script >
< script src = "confetti.js" id = "confetti.js" > < / script >
< / html >