chatango redirect

redirects to html or flash automatically

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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;
}