Repository: kleampa/not-paid Branch: master Commit: 55131d2a9a8b Files: 2 Total size: 2.2 KB Directory structure: gitextract_6wlio2j1/ ├── README.md └── not-paid.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: README.md ================================================ ## GitAds Sponsored [![Sponsored by GitAds](https://gitads.dev/v1/ad-serve?source=kleampa/not-paid@github)](https://gitads.dev/v1/ad-track?source=kleampa/not-paid@github) ## Client did not pay? Add opacity to the body tag and decrease it every day until their site completely fades away. Set a due date and customize the number of days you offer them until the website is fully vanished. ```javascript /* change these variables as you wish */ var due_date = new Date('2017-02-27'); var days_deadline = 60; /* stop changing here */ ``` PS: Next time use [letsdeel.com](https://letsdeel.com ) to make sure you get paid. ## Usage Just load the not-paid.js file in `````` - A Wordpress plugin is also available [here](https://github.com/SurfEdge/not-paid-wp). - There's also an Android version available [here](https://github.com/theapache64/faded). - There's also an Windows Forms version available [here](https://github.com/g-otn/winforms-not-paid). - Flutter version available [here](https://github.com/krishnakumarcn/faded). - iOS (SwiftUI) version available [here](https://github.com/vfrascello/not-paid-ios/). - Angular version available [here](https://github.com/CleitonJB/not-paid). ## Author Inspired from twitter (@riklomas) Made by Ciprian (@kleampa), Romania PS: No PR's or issues will be accepted for this project. ================================================ FILE: not-paid.js ================================================ // Next time use letsdeel.com to make sure you get paid (function(){ /* change these variables as you wish */ var due_date = new Date('2017-02-27'); var days_deadline = 60; /* stop changing here */ var current_date = new Date(); var utc1 = Date.UTC(due_date.getFullYear(), due_date.getMonth(), due_date.getDate()); var utc2 = Date.UTC(current_date.getFullYear(), current_date.getMonth(), current_date.getDate()); var days = Math.floor((utc2 - utc1) / (1000 * 60 * 60 * 24)); if(days > 0) { var days_late = days_deadline-days; var opacity = (days_late*100/days_deadline)/100; opacity = (opacity < 0) ? 0 : opacity; opacity = (opacity > 1) ? 1 : opacity; if(opacity >= 0 && opacity <= 1) { document.getElementsByTagName("BODY")[0].style.opacity = opacity; } } })()