Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name GoogleFormFiller
- // @namespace Tikna
- // @description Random value completer
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
- // @include https://docs.google.com/forms/d/*
- // @version 1
- // @grant none
- // ==/UserScript==
- this.$ = this.jQuery = jQuery.noConflict(true);
- $(document).ready(function()
- {
- var myArray = ['21486','112313','223431321','9782348673','ram424','12077','234354','1212q23','Harshy','Mitega','mamla','Chalega', 'Arun', 'Kant' , 'Crazes', 'Surely','Hugerection','Chamunda','Imam', 'Bhatt', 'Rosesh', 'Sarabhai','Monisha', 'Ross','Monica','Chandler','Indu', 'Safe Heaven' ,'Inception', 'Dark Knigt','Mallu Antu','Harshyhsnd','fight club','Sweet November','Hasns','No Offensive Words Please','Thank you','Sorry','Who do you think you are','See you again','Castle of glass','November rain','guns n roses','YOu dont know you are beautiful','ring my bells','booty','Anaconda','TVF','The viral fever','What does the fox say','Long live Me','Viva la vida'];
- //alert("jQuery is loaded");
- setTimeout(
- function()
- {
- $('input[type=checkbox]').each(function () {
- var ran = Math.floor(2 * Math.random() );
- ran = ran-1;
- if(ran)
- $(this).prop('checked',true);
- else
- $(this).prop('checked',false);
- // var rand = myArray[Math.floor(Math.random() * myArray.length)];
- // alert($(this).val())
- // if($(this).val()== "palak" || $(this).val()=="kaddu" || $(this).val()=="Baingan Bharta" )
- // { $(this).prop('checked',true);}
- //
- });
- //do something special
- }, 100);
- setTimeout(function()
- {
- $('input[type=text]').each(function () {
- var rand = myArray[Math.floor(Math.random() * myArray.length)];
- $(this).val(rand);
- });
- //do something special
- }, 50);
- setTimeout(function()
- {
- $('textarea').each(function () {
- var rand = myArray[Math.floor(Math.random() * myArray.length)];
- $(this).val(rand);
- });
- //do something special
- }, 50);
- setTimeout(function()
- {
- var k = Math.floor(50 * Math.random() );
- var p = 1;
- var ch = 1;
- var radios = $('input[type=radio]')
- if (radios.length > 0) {
- var randomnumber = Math.floor(Math.random() * radios.length);
- radios[randomnumber].checked = true;
- }
- // $('input[type=radio]').each(function () {
- //var rand = myArray[Math.floor(Math.random() * myArray.length)];
- // if(p==1)
- // $(this).prop('checked',true);
- // if(k > 20*ch )
- // {$(this).prop('checked',true);
- // }
- // k = Math.floor(50 * Math.random() ) ;
- // p = p+1;
- // });
- //do something special
- }, 50);
- setTimeout(
- function()
- {
- $('input[type=submit]').each(function () {
- // alert("Submittting a button " + $(this).val());
- $(this).click();
- });
- }, 2000);
- // if(content.document.location = "https://docs.google.com/forms/d/1MeJLzUEOis3c68XUzxRlTO0zTJj6T1HXJNhHzrVqL_s/formResponse");
- // {
- // alert(current.document.location);
- // window.location.replace("https://docs.google.com/forms/d/1MeJLzUEOis3c68XUzxRlTO0zTJj6T1HXJNhHzrVqL_s/viewform");
- setTimeout(
- function()
- {
- // alert("submitting ");
- $('.ss-bottom-link')[0].click();
- }, 500);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement