Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Chillax tweaks
- // @version 1
- // @description Crack the free user account, auto relogin, clean promos and more to enable unlimited movie watching
- // @author Freddie
- // @include /^http(.?):\/\/chillax\.ws\/*/
- // @run-at document-start
- // ==/UserScript==
- (function() {
- 'use strict';
- // Chillax tweaks settings:
- var CrackPremium = true;
- var HidePremiumPromos = true;
- var AttemptAutoLogin = true;
- var LoginWithFacebook = true; // If set to false, the username and password variables will be used for autologin
- var UserName = "example@gmail.com";
- var Password = "your password";
- // These mods can only be applied once the DOM has fully loaded:
- window.onload = function () {
- // Autologin:
- if (window.location.href.includes("chillax.ws/session/login") && AttemptAutoLogin) {
- if (LoginWithFacebook) {
- document.getElementsByClassName('btn-auth btn-facebook')[0].click();
- } else {
- document.getElementById("signin-username").value = UserName;
- document.getElementById("signin-password").value = Password;
- document.getElementsByClassName("watch-this-button sendit")[0].click();
- }
- }
- // Bypass premium:
- function myFunction() { console.log("Premium check bypassed."); }
- function override_function(text, s_URL, funcToRun, runOnLoad) {
- var scriptNode = document.createElement ('script');
- if (runOnLoad) {
- scriptNode.addEventListener ("load", runOnLoad, false);
- }
- scriptNode.type = "text/javascript";
- if (text) scriptNode.textContent = text;
- if (s_URL) scriptNode.src = s_URL;
- if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
- var targ = document.getElementsByTagName ('head')[0] || document.body || document.documentElement;
- targ.appendChild (scriptNode);
- } // Override functions function, credit to https://stackoverflow.com/a/13485650
- if (CrackPremium) { override_function(myFunction); }
- document.getElementsByClassName("mobile-nav")[0].getElementsByTagName("ul")[0].innerHTML +=
- '<li><a href=""><i class="icon-uninstall"></i><span>Cracked by Freddie</span></a></li>';
- };
- if (HidePremiumPromos) {
- // Auto redirect off the premium page:
- if (window.location.href.includes("chillax.ws/users/premium")) {
- location.href = "http://chillax.ws/movies";
- }
- // Hide page clutter:
- // Credits to https://stackoverflow.com/a/39347807
- // With script running at document start, elements can be removed before being rendered for an invisible page cleanup
- new MutationObserver(function(mutations) {
- // Premium buttons:
- var premiumButtons = document.getElementsByClassName('premium');
- for (var i = 0; i < premiumButtons.length; i ++) {
- premiumButtons[i].style.display = 'none';
- }
- // Premium tab:
- var aTags = document.getElementsByTagName("a");
- for(var i2 = 0; i2 < aTags.length; ++i2) {
- if(aTags[i2].getAttribute("href") == "/users/premium") {
- aTags[i2].style.display = 'none';
- }
- }
- }).observe(document, {childList: true, subtree: true});
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement