NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name DYS-LongzhuTV
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Make longzhu tv live better!
// @author jwenjian
// @match http://star.longzhu.com/*
// @grant none
// @require http://code.jquery.com/jquery-3.3.0.min.js
// @license GPL-3.0
// ==/UserScript==
(function() {
'use strict';
setTimeout(function() {
hideUnusedElements();
updateUI();
closePopups();
}, 3000);
})();
function hideUnusedElements() {
// hide top banner pic
$('div.top-banner-pic').hide();
// hide hot games
$('#games-hot').hide();
// hide left nav
$('#left-nav').hide();
// hide right nav
$('#right-nav').hide();
// hide little game link
$('div.live-footer-games').hide();
// hide outsource link
$('#outresource-link').hide();
// hide offical activities
$('#official-activities').hide();
// hide ad
$('div.stage-container-widget').children('div.stage-container-left').hide();
// hide bottom image small except guess section
$("div.bottom-image-small").each(function(){
let guess = $(this).children("div[id='guess']");
if (!guess) {
$(this).hide();
}
});
$("div.bottom-image-small").children('div').children('a').hide();
// hide user send gift
$('div.user-sendgift-box').hide();
$('#quiz-intrduction').hide();
// hide modal above chat room
$("embed[id=':13']").hide();
setInterval(function(){
// hide task
$('div.challenge-task').hide();
// hide Su Ning lion
$('div.tp-link').hide();
$('#stage-center').css('padding-left', '0px');
let popup = $('div.task-popup');
if (popup && popup instanceof Array) {
popup.each(function(){
$(this).hide();
});
}
}, 1000);
$('div.horn-list').css('height', '0px');
}
function updateUI() {
$('div.announcement').addClass('stage-container-right');
$('div.stage-container-head').children('div.stage-container-right').replaceWith($('div.announcement'));
$('div.stage-inner.stage-rankside').css('padding-right', '0px');
$("div[data-label='chatroom-sendgift-history-tab']").hide();
$('#onlineListCont').hide();
$('#ch-user-list').hide();
$('body').css('overflow-x', 'hidden');
}
function closePopups() {
// close task finished tips
let taskFinishedCloseBtn = $('div.task_finished_dialog_close');
taskFinishedCloseBtn.click();
// disable all the chat filter
$('div.chat-filter').children('label.chat-filter-all').children('i.chat-filter-checkbox').click();
// close new guess tips
$('div.new-guess-close').click();
}