I was sick and tired of the redirect issue on chaturbate... whenever I check my stats, I requires me to reenter my password which then redirects to the main page.. so, instead of logging out, clicking affiliates, clicking stats and logging back in, I wrote a simple, but a bit messy greasemonkey / tampermonkey script to do this for me lol
use it if you want :D
Quote:
// ==UserScript==
// @name Chaturbate Login Redirect
// @namespace Tampermonkey ? Home
// @version 1
// @description The script simply checks if you need to log out and log back in to your account.
// @author zerovic
// @match *://chaturbate.com/*
// @require https://ajax.googleapis.com/ajax/lib.../jquery.min.js
// @grant none
// ==/UserScript==
var is_logged_in = $('.sec_section h2').text();
var confirm_logout = $('.content_body h1').text();
var current_url = window.location.href;
if (is_logged_in.length > 0) {
if (is_logged_in === "Password Required") {
location.href = "https://chaturbate.com/auth/logout/";
}
}
if (confirm_logout === "Logout Confirmation") {
document.forms[0].submit();
}
if(confirm_logout === "Chaturbate Login") {
if (current_url === "https://chaturbate.com/auth/login/") {
location.href = "https://chaturbate.com/auth/login/?next=/affiliates/stats/";
} else if (current_url === "https://chaturbate.com/auth/login/?next=/affiliates/stats/") {
//remove or comment out the next 3 lines if you don't have your CB user details saved in your browser.
setTimeout(function() {
document.forms[0].submit();
}, 1500);
//do not remove anything under this.
}
}
|
again, it's messy, wrote it before I had my first coffee today =D
Cheers,
z