chatango redirect

redirects to html or flash automatically

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        chatango redirect
// @namespace   2pichubros_chatango
// @description redirects to html or flash automatically
// @include     /(http|https):\/\/.*?\.chatango.com\/$/
// @version     2
// @grant       none
// ==/UserScript==
blacklist = []; //Add users/chats that you would not like to have redirected here
url = window.location.href;
user = url.split(".")[0].split("://")[1]
mode = "html5"; //set to either html5 or flash depending on what you want to redirect to
if (blacklist.indexOf(user) >= 0){
  console.log("redirect in blacklist... passing")
  return "Blocked"
}
else{
  if (mode == "html5"){
    mode = "?js"
  }
  else if (mode == "flash"){
    mode = "?flash"
  }
  window.location.href = window.location.href+mode;
}