New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

peteshow

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peteshow

  • 0.8.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Peteshow

a customizable javascript framework for filling out forms with fake data

Imgur

Getting Started

See the Wiki on GitHub for documentation.

Also specific pages for frameworks:

API

Peteshow.init()

Adds the seen above menu to the top left of your page. Press backtick ` to toggle the menu.

Peteshow.fillOutForms()

Using the default rules, fills out inputs, checkboxes, selects, and radio buttons. While the menu is open, press f to call this method.

Peteshow.fillOutFormsAndSubmit()

Does the same as above, but also submits the form. Press q to call this method.


It also has several other methods exposed:

MethodsDescription
submitForm()Submits the form on the page, can be customized
destroy()Removes the Peteshow menu from the dom
hide()Hides the Peteshow menu
show()Shows the Peteshow menu
formatDate(format, Date)Returns a string with the specified format
randomChars(length, chars)Returns a string made up of specific characters
randomDate(format)Returns a random date string
randomEmail()Returns a random email, customized using init options
randomLetters(length)Returns random letters
randomNumber(length)Returns a random number, you can pass an optional prefix
randomNumberRange(min,max)Returns a number between min and max

To access the stored values used in the reuse option, use Peteshow.storage:

MethodsDescription
storage.clear()Clears saved fields from cookies and localstorage
storage.get()Prints out the saved fields used in the reuse option
storage.set(hash)Sets either cookie or localstorage, takes a hash

Default options

Peteshow can be customized by creating a custom plugin. Here are the default options:

options = {
  emailPrefix : 'test-',
  emailDomain : 'example.com',
  form        : '',
  blur        : false,
  cookies     : false,
  rules       : {},
  ignore      : [],
  filter      : [],
  force       : {},
  reuse       : {},
  commands    : '',
  special     : function(){},
  events      : function(){},
}
$(function() {
  Peteshow.init(options)
})
NameDescription
emailPrefixPrefix for your generated email addresses. Random numbers are added to the end
emailDomainThe domain for your generated email addresses
formThe selector of the form/forms you want to be filled out, defaults to last form on page
blurTriggers blur() event after filling out an input
cookiesStore saved fields (from reuse) in cookies rather than localStorage
rulesA hash of selectors to values that you want to be used when filling out forms. It ignores hidden inputs
specialCalled after the rules are applied and can include custom javascript
ignoreAn array of input IDs you wish to have fill out forms ignore
forceSimilar to rules, but can be used for hidden inputs
filtersFilters out options from select boxes
reuseDefine input selectors to be saved and reused on certain URLs
eventsUsed in the off chance you need to add extra javascript on Peteshow's init

Further notes

enova

Developed by Pete Brousalis in his spare time for use at Enova in Chicago, IL.

Special thanks to Matthew Bergman & Marak Squires for Faker.js, Adam Gschwender for jquery.formatDateTime, Klaus Hartl for jquery.cookie, all used by Peteshow.

And especially Donnie Hall for creating the original Peepshow

FAQs

Package last updated on 20 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc