Advertisement
Guest User

Untitled

a guest
Jul 15th, 2017
658
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Chillax tweaks
  3. // @version 1
  4. // @description Crack the free user account, auto relogin, clean promos and more to enable unlimited movie watching
  5. // @author Freddie
  6. // @include /^http(.?):\/\/chillax\.ws\/*/
  7. // @run-at document-start
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Chillax tweaks settings:
  14. var CrackPremium = true;
  15. var HidePremiumPromos = true;
  16. var AttemptAutoLogin = true;
  17. var LoginWithFacebook = true; // If set to false, the username and password variables will be used for autologin
  18. var UserName = "example@gmail.com";
  19. var Password = "your password";
  20.  
  21.  
  22.  
  23.  
  24.  
  25. // These mods can only be applied once the DOM has fully loaded:
  26. window.onload = function () {
  27. // Autologin:
  28. if (window.location.href.includes("chillax.ws/session/login") && AttemptAutoLogin) {
  29. if (LoginWithFacebook) {
  30. document.getElementsByClassName('btn-auth btn-facebook')[0].click();
  31. } else {
  32. document.getElementById("signin-username").value = UserName;
  33. document.getElementById("signin-password").value = Password;
  34. document.getElementsByClassName("watch-this-button sendit")[0].click();
  35. }
  36. }
  37.  
  38. // Bypass premium:
  39. function myFunction() { console.log("Premium check bypassed."); }
  40. function override_function(text, s_URL, funcToRun, runOnLoad) {
  41. var scriptNode = document.createElement ('script');
  42. if (runOnLoad) {
  43. scriptNode.addEventListener ("load", runOnLoad, false);
  44. }
  45. scriptNode.type = "text/javascript";
  46. if (text) scriptNode.textContent = text;
  47. if (s_URL) scriptNode.src = s_URL;
  48. if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
  49. var targ = document.getElementsByTagName ('head')[0] || document.body || document.documentElement;
  50. targ.appendChild (scriptNode);
  51. } // Override functions function, credit to https://stackoverflow.com/a/13485650
  52. if (CrackPremium) { override_function(myFunction); }
  53.  
  54. document.getElementsByClassName("mobile-nav")[0].getElementsByTagName("ul")[0].innerHTML +=
  55. '<li><a href=""><i class="icon-uninstall"></i><span>Cracked by Freddie</span></a></li>';
  56. };
  57.  
  58. if (HidePremiumPromos) {
  59. // Auto redirect off the premium page:
  60. if (window.location.href.includes("chillax.ws/users/premium")) {
  61. location.href = "http://chillax.ws/movies";
  62. }
  63.  
  64. // Hide page clutter:
  65. // Credits to https://stackoverflow.com/a/39347807
  66. // With script running at document start, elements can be removed before being rendered for an invisible page cleanup
  67. new MutationObserver(function(mutations) {
  68. // Premium buttons:
  69. var premiumButtons = document.getElementsByClassName('premium');
  70. for (var i = 0; i < premiumButtons.length; i ++) {
  71. premiumButtons[i].style.display = 'none';
  72. }
  73. // Premium tab:
  74. var aTags = document.getElementsByTagName("a");
  75. for(var i2 = 0; i2 < aTags.length; ++i2) {
  76. if(aTags[i2].getAttribute("href") == "/users/premium") {
  77. aTags[i2].style.display = 'none';
  78. }
  79. }
  80. }).observe(document, {childList: true, subtree: true});
  81. }
  82. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement