Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reddit-wallpapers

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reddit-wallpapers

to help fetching wallpapers with reddit api and loop setting them

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

reddit-wallpapers (beta)

Script to help in fetching wallpapers from Reddit API and loop setting them

Live Demo

Setup:

<head>
  <script src='bundle.js' type='text/javascript'></script>
  <script type='text/javascript'>
    var WManager = redditWallpapers({
      id: '.toChange'
    })
  </script>
</head>
<body>
  <div class='.toChange'>
    <h1>Reddit Wallpapers !</h1>
  </div>
</body>

Options:

self.options = { // default options, if not provided
    id: options.id || '.reddit', // id or css class of element to wallpaper to
    category: options.category || self.categories, // Array of categories to choose from randomly
    duration: options.duration || 10000, // duration of 5 seconds
    aDuration: options.aDuration * 1000 || 1000, // transsition animation duration
    limit: options.limit || 30, // limit of json items
    timeout: options.timeout * 1000 || 5000, // request timeout in seconds
    overlay: options.overlay || 'rgba(0,0,0,0.7)', // black transparnt overlay color
    isOverlayed: options.isOverlayed || 'true', // to add overlay to the wallpaper
    isFixed: options.isFixed || 'false', // to set wallpaper to fixed position
    isMixed: options.isMixed || 'false', // to make sure wallpapers selected from mixed categories
    isAnimated: options.isAnimated || 'true' // to use jQuery animation
}

Functions:

To use any of the following functions, you have to get an instance of the constructor, which we did in the Setup section :

var WManager = redditWallpapers()
WManager.following_functions()

FunctionDescribtion
next()set the next wallpaper
previous()set the previous wallpaper
stop()stop loop setting wallpapers
restart()reset settings to default and restart looping

Dependencies:

  • jQuery

Keywords

FAQs

Package last updated on 25 May 2018

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