Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theonion/comcastifyjs
Sometimes images just load too damned fast.
https://github.com/theonion/comcastifyjs
Last synced: about 1 month ago
JSON representation
Sometimes images just load too damned fast.
- Host: GitHub
- URL: https://github.com/theonion/comcastifyjs
- Owner: theonion
- License: mit
- Archived: true
- Created: 2014-09-09T17:49:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-25T03:39:27.000Z (about 6 years ago)
- Last Synced: 2024-08-01T12:35:36.734Z (4 months ago)
- Language: JavaScript
- Homepage: http://theonion.github.io/comcastifyjs/
- Size: 2.22 MB
- Stars: 1,260
- Watchers: 33
- Forks: 48
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dev-fun - ComcastifyJS - Sometimes images just load too damned fast. (JavaScript)
- awesome-starred - theonion/comcastifyjs - Sometimes images just load too damned fast. (others)
- stars - theonion/comcastifyjs - Sometimes images just load too damned fast. \[*MIT License*\] (⭐️1260) *Archived!* (JavaScript)
- stars - theonion/comcastifyjs - Sometimes images just load too damned fast. \[*MIT License*\] (⭐️1260) *Archived!* (JavaScript)
README
# ComcastifyJS
With all this internet going around, sometimes you just want to experience the thrill of a long page load. Give your users the chance to enjoy a little slice of the future by slow loading your website's images with ComcastifyJS!## Lets slow things down!
1. Include comcastify.js on your page, or use the latest version from our CDN:```html
```2. Prepare the images on your page on document ready (so images don't show up before the box):
```js
comcastifyjs.letsPrepareTheseImages();
```3. Initialize comcastify on window load (so image sizes are properly calculated):
```js
comcastifyjs.fixMyImagesLoadingSoFast({
boxColor: '#123456',
loadMaxPercent: 0.75,
loadSpeed: 100,
loadIncrement: 5
});
```
4. Switch up parameters to change your experience:
* **elements** : A list of DOM elements to limit comcastification to.
* **boxColor** : The hex color for the box placed over images.
* **loadMaxPercent** : The max percentage of image to load. (0 to 1)
* **loadSpeed** : Time required to load your images to their max in ms.
* **loadIncrement** : Number of pixels to load each time the loadSpeed timer ticks.
* **randLoadIncrement**: Set to true to make load increment random, loadIncrement ignored in this case.
* **randomPause** : Probability of skipping a pass each time the loadSpeed timer ticks. (0 to 1)
* **progressiveJPEG** Set to true to enable progressive JPEG emulation## See it in action!
See an example on the project's site at: http://theonion.github.io/comcastifyjs/Or, see it modeled by [these koalas!](http://www.clickhole.com/article/these-koalas-are-refusing-load-support-net-neutral-967)
## That's it!
Now grab a coffee and enjoy the load times!