cb-mini

Minimize menus, hide banners and maximize the cam screen on chaturbate.com

Fra 19.02.2016. Se den seneste versjonen.

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==
// @author       @leoncastro
// @namespace    https://github.com/leoncastro
// @name         cb-mini
// @version      0.04
// @description  Minimize menus, hide banners and maximize the cam screen on chaturbate.com
// @icon         https://github.com/leoncastro/us-cb/raw/master/img/icon.png
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
// @include      /^(?:https?:)?\/\/(?:[^\.\/]*\.)*chaturbate\.com\/*.*/
// @exclude      /^(?:https?:)?\/\/(?:public|blog|shop)\.chaturbate\.com\/*.*/
// @compatible   firefox+greasemonkey
// @compatible   chrome+tampermonkey
// @grant        none
// @run-at       document-start
// ==/UserScript==
/*
 v0.01: hide popup (body div#main div#overlay)+(body div#main div#entrance_terms)
        hide banner top (body div#header div.ad)
        edit logo (body div#header div.section div.logo-zone strong.logo), smaller
        hide slogan (body div#header div.section div.logo-zone strong.logo+strong)
        hide main menu (body div#header div.nav-bar), except login
        hide sub menu advanced items (body div#main div.top-section div.advanced_search_button_shell)
        edit sub menu position (body div#main div.top-section ul.sub-nav)
        hide banner right (body div#main div.content div.ad)
        hide contents footer extra info (body div#main divcontent div.featured_blog_posts)+(body div#main divcontent div.featured_text)
        resize contents (body div#main div.content)
        hide banner botom (body div#main div.banner)
        hide footer (body div#footer-holder)
 v0.02: make sub menu with blue style like main menu
        style(body div#main div.top-section ul.sub-nav li a) = style(body div#header div.nav-bar ul#nav li a)
        hide login menu too (body div#header div.nav-bar li.login-link)|(body div#header div.nav-bar)
 v0.03: edit sub menu position, now is fixed
 v0.04: require jquery, rewrite some vanilla-js
        remove redirection in external links (a[href^="/external_link/?url="])
        make player on top of bio elements with absolute or fixed position (element.style.position=absolute|fixed)
        add login (body div#header div.nav-bar li.login-link) to sub-menu (body div#main div.top-section ul.sub-nav)
        remove watermark on flash video
        remove tip sound
        add a scroll-to-top button
        add href to profile menu link
*/
// // fast vanilla-js code:
// set styles
function add_css(css,id)
{
 var dad,obj;
 dad=document.getElementsByTagName('head')[0];
 dad||(dad=document);
 if(id&&(obj=document.getElementById(id)))
 {
  obj.innerHTML=css;
 }
 else
 {
  obj=document.createElement('style');
  id&&obj.setAttribute('id',id);
  obj.setAttribute('type','text/css');
  obj.innerHTML=css;
  dad.appendChild(obj);
 }
}
add_css('\
body{min-width:0!important}\
#header .ad{display:none!important}\
#header .section{position:fixed;top:0;width:100%;height:36px!important;padding-top:3px;background:#0c6a93;border-bottom:3px solid #f47321; z-index:100}\
#header .section .logo-zone{padding:0 15px}\
#header .section .logo-zone .logo{width:100px;height:39px;padding:0;background-image:url("https://ssl-ccstatic.highwebmedia.com/images/flashwatermark.png")}\
#header .section .logo-zone .logo+strong{display:none}\
#header .nav-bar{display:none}\
#main{padding-top:42px}\
#main .top-section{position:fixed;top:0;height:39px;margin-left:140px;padding:0;overflow:hidden;background:#0c6a93;border-bottom:3px solid #f47321; font:inherit;z-index:100}\
#main .top-section:after{content:inherit;display:inherit;clear:inherit}\
#main .top-section .advanced_search_button_shell{display:none}\
#main .top-section .actions{display:none}\
#main .top-section .sub-nav{position:relative;min-width:0;margin:0;padding:6px 0 0; list-style:none;text-shadow:1px 1px 0 #000;font:1.166em "UbuntuMedium",Arial,Helvetica,sans-serif;line-height:30px; display:inherit;top:inherit;height:inherit;overflow:inherit;z-index:100}\
#main .top-section .sub-nav li{margin:0 20px 0 0;padding:0}\
#main .top-section .sub-nav li.active{  color:#fff;background:#f47321;border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;padding:3px 15px 0 15px;position:relative;margin-right:25px;}\
#main .top-section .sub-nav li.selected{  font-size:inherit;line-height:inherit;}\
#main .top-section .sub-nav li a{ color:#fff;float:left; background:transparent;border:none;border-radius:none;-webkit-border-radius:none;-moz-border-radius:none;padding:0 0 0 0;cursor:pointer;height:100%}\
#main .top-section .sub-nav li a:hover{  text-decoration:underline;background:transparent;color:#fff;border-bottom:none;}\
#main .top-section .sub-nav li.active a{  text-decoration:none;background:none;margin:0;padding:0 0 0 0}\
#main .content{padding:10px!important}\
#main .content .ad{display:none}\
#main .content .ad.top_tags{display:none}\
#main .content .c-1{margin:0 0 0 5px!important}\
#main .content .c-1 .list{min-width:0!important}\
#main .content .c-1 .list li{margin:0 0 5px 5px!important}\
#main .content .c-1.endless_page_template .paging li{}\
#main .content .featured_blog_posts{display:none}\
#main .content .featured_text{display:none}\
#main .banner{display:none}\
#main #overlay{display:none!important}\
#main #entrance_terms{display:none!important}\
.footer-holder{display:none}\
#player{z-index:90}\
\
ul.to_top{position:fixed!important;bottom:10px;right:10px;opacity:1; -webkit-transition:all 0.5s ease-in-out;-moz-transition:all 0.5s ease-in-out;-ms-transition:all 0.5s ease-in-out;-o-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out;}\
ul.to_top.on_top{bottom:-10px;opacity:0}\
ul.to_top a{background:#fceadb url("https://ssl-ccstatic.highwebmedia.com/images/arrow-left.gif") no-repeat 50% 50%;transform:rotate(90deg)}\
\
','cb-mini');
// // jquery on-load code:
(function($,undefined){$(function(){$(document).ready(function(){
// ==jQ==
//
// remove redirection in external links (/external_link/?url=...)
$('a[href]').each(function(i,e){
 var x=$(this).attr('href');
 x=/\/external_link\/\?url=(.*)&domain=.*/i.exec(x);
 if(x&&x[1]&&(x=decodeURIComponent(x[1])))$(this).attr('href',x);
});
// make player on top of bio elements with absolute or fixed position (element.style.position=absolute|fixed)
$('.info-user .bio dl').each(rem_fix);
function rem_fix(i,e)
{
 if( /(fixed|absolute)/.test($(this).css('position')) )
  // just ignore it, change z-index lower than player
  $(this).css('zIndex',0);
 $.each($(e).children(),rem_fix);
}
// add login (body div#header div.nav-bar li.login-link) to sub-menu (body div#main div.top-section ul.sub-nav)
if(!$('#user_information').length)
 $('#main .top-section .sub-nav').append($('<li>'+$('#header .nav-bar .login-link').clone().wrap('<p>').parent().html()+'</li>'));
// remove watermark on flash video
var x=$('#xmovie');
if(x.length)
{
 x.attr('value',x.attr('value').replace('&elu=https://ssl-ccstatic.highwebmedia.com/images/flashwatermark.png',''));
}
else
{
 if(typeof window.EmbedViewerSwf!='undefined')
 {
  var u=window.EmbedViewerSwf;
  window.EmbedViewerSwf=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){return u(a,b,c,d,e,f,g,h,i,j,k,l,m,'',o,p,q,r,s,t)}
 }
}
// remove tip sound
window.PlayBeep=function(a){};
window.play_html_sound_level=function(a,b){};
// add a scroll-to-top button
$('<ul class="paging to_top on_top"><li><a href="#to_top" class="prev">To top</a></li></ul>').insertAfter($('#main .content .c-1'));
$(window).scroll(function(){$(this).scrollTop()>100?$('.to_top').removeClass('on_top'):$('.to_top').addClass('on_top')});
$('.to_top').click(function(){$('html, body').stop().animate({scrollTop:0},500);return false});
// add href to profile menu link
var x=$('#main .top-section .active a[href="#"]');
if(x.length)
{
 x.attr('href',window.location.href);
}
//
// ==/jQ==
});});})(window.jQuery.noConflict(true));