// ==UserScript== // @name SmartChute // @version 20.3.11 // @description BitChute.com Enhancer. Adds missing features. Makes you feel warm. // @license MIT // @author S-Marty // @compatible firefox // @compatible chrome // @compatible opera // @namespace https://github.com/s-marty/SmartChute // @homepageURL https://github.com/s-marty/SmartChute // @supportURL https://github.com/s-marty/SmartChute/wiki // @icon https://raw.githubusercontent.com/s-marty/SmartChute/master/images/smartChute2.png // @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QHFFSLZ7ENUQN&source=url // @include /^https?://www\.bitchute\.com.*$/ // @grant GM.getValue // @grant GM.setValue // @grant GM.info // @grant GM.xmlHttpRequest // @run-at document-end // @noframes // @downloadURL none // ==/UserScript== // @compatible Firefox 16+, Chrome 36+, Opera 15+, Brave 1.0.1+, Vivaldi 2.2+ // @compatible TamperMonkey 4.10+, ViolentMonkey 2.12+, Greasemonkey 4.7+ /* greasyfork.org jshint syntax checking hacks */ /* jshint asi: true */ /* jshint boss: true */ /* jshint esversion: 6 */ /* jshint loopfunc: true */ /* jshint multistr: true */ /** ********************** Features ********************** *** Accelerated Bit Chute user experience ahead *** Floating mini video player is visible when scrolling *** Floating mini video player position is draggable *** Floating mini video player size is mouse resizeable *** Downloader for your favorite videos and posters. *** Up to 25 playlist choices in sidebar when viewing playlists. *** Blacklist annoying channels with one click if enabled *** De-blacklist channels with two clicks using Smarty menu *** Double-click the Smarty menu button for additional options. *** Unfix top header to show only while up-scrolling *** Hide the upper channel carousel using Smarty menu *** Hide unsafe ads to avoid viruses or other malware *** Hide or unhide comments section - make up your own mind or not *** Scrolls down to video player automatically if header is unfixed *** Seek by single frame using <> (,.) keys while video is paused. *** Mouse-over the progress bar for frame preview. (not for slow conn.) *** *Requires ~8mB additional bandwidth for a 640x360 video. *** Volume indicator visible when using ↑↓ keys. *** Full screen forward/back navigation, autoplay or not. *** Take and edit a downloadable screenshot of the current video frame. *** Autoplay videos or not is now selectable *** Video volume is persisted - No More 100% volume on the first play *** Theme night/day is persisted when clicking the sun/moon icon *** Three additional night themes for your tired eyes *** Play Next persists when clicking the "PLAYING NEXT" button *** Persistence lasts across browser instantiations too *** Top ten most viewed channel video playlist on video page option *** Channel owner-created playlists displayed on video page option *** 32 More video choices on Video watch page vs. 6 *** Unlimited video choices using "SHOW MORE" button, vs. 6 *** OpenSearch browser search to search from address or search bar *** Rss channel feed subscribe link (Browser extension now needed) *** All browsers have now dropped live bookmarks/rss feeds *** The rss url format is: *** https://www.bitchute.com/feeds/rss/channel/[CHANNEL_NAME]/ *** Smarty menu always available *** *** Does not & will not work well with IE and IEdge ***/ /* Editable options */ const BC_Debug = true; /* End Editable options */ (function() { "use strict"; const w = window; const d = document; const name = "SmartChute"; const scriptHandler = GM.info.scriptHandler; const isChrome = navigator.userAgent.indexOf('Chrome') !=-1; const BC = { miniPlayerX: 0, miniPlayerY: 0, miniPlayerW: 0, miniPlayerH: 0, startButton: 0, isFullScreen: false, listingsAllHeight: 0, listingsPopHeight: 0, miniSiz: {h: 0, hd: 0}, miniPos: {x:0,y:0,xd:0,yd:0}, origVid: {w:698,h:393,r:1.778}, miniplayer: { x:0,y:0,w:350,h:197 }, chuteMePlease: (e) => { BC.url = w.location.href; BC.host = w.location.hostname; BC.path = w.location.pathname; BC.searchpage = BC.url.indexOf('/search') !=-1; BC.watchpage = BC.path.indexOf('/video') !=-1; BC.profilepage = BC.path.indexOf('/profile/') !=-1; BC.channelpage = BC.path.indexOf('/channel/') !=-1; BC.categorypage = BC.path.indexOf('/category/') !=-1; BC.playlistpage = BC.path.indexOf('/playlist/') !=-1; BC.homepage = BC.url.match(/^https?:\/\/www\.bitchute\.com\/?$/); if (BC.watchpage && BC.url.indexOf('list=') !=-1) BC.playlist = BC.url; else if (BC.watchpage && qs(".sidebar-next a") && qs(".sidebar-next a").href.indexOf('list=') !=-1) BC.playlist = qs(".sidebar-next a").href; else BC.playlist = null; if (!BC.loaded) { if (!BC.loader) { if (BC.loader = qs("title")) { addListener(BC.loader, (e) => { if (isChrome && BC.settings.hidemenubar) { if (! document.activeElement.href) {w.scrollTo(0, 0)} } BC.chuteMePlease(e); },{ childList: true }); } qs("#loader-container").addEventListener('dblclick', (e) => { e.stopPropagation(); w.stop(); e.target.style.display = "none"; }, false); } if (! (BC.homepage || BC.watchpage || BC.channelpage || BC.categorypage || BC.profilepage || BC.searchpage || BC.playlistpage)) return; if (!BC.themes) { setTimeout(BC.addThemeListeners, 2000); if (isChrome && BC.settings.hidemenubar) { w.addEventListener('beforeunload', function(e){ if (!document.activeElement.href){w.scrollTo(0, 0)} }, false); } BC.setTheme(); BC.setPreferencesCookie("autoplay", BC.settings.playnext); BC.themes = true; } if (BC.searchpage || BC.profilepage || BC.playlistpage) return; let style = dce("style"); style.type = "text/css"; style.innerText = ` .nav-tabs-list {min-width: 500px !important; width: 100%;} .sidebar-recent .video-card.active {box-shadow: 0 0 1em 0.2em #f37835; border-radius:5px;} .playlist-card.active {border-top: 1px solid #f37835bb; box-shadow: 0 2px 1em 0.2em #f37835; border-radius:5px;} svg.smarty-donate {float:right;cursor: pointer; color:#209227;display: block;} svg.smarty-donate:hover {-webkit-transform:rotate(14deg) scale(1.2);-khtml-transform:rotate(14deg) scale(1.2);transform:rotate(14deg) scale(1.2);color:#30a247;} #loader-container {opacity: 0.5;} span.add-to-blacklist { position: absolute; top: 4px; left: 4px; z-index: 50; width:30px; height:30px; } a.side-toggle {cursor: pointer; } svg.smarty-donate {-webkit-transition: transform 0.25s ease-in, color 0.25s; -moz-transition: transform 0.25s ease-in, color 0.25s; -khtml-transition: transform 0.25s ease-in, color 0.25s; transition: transform 0.25s ease-in, color 0.25s;} span.blacklist-tooltip { position: absolute; font-size: 14px;padding: 0 4px; height: 22px; left: 2px; top: 38px; line-height: 1.6; background-color: #000 ;display:none;} #smarty_tab label:hover, #smarty_tab #blacklistedchannels span:hover {color:#ef4136;} #smarty_tab #smartymm > div, #smarty_tab #blacklistedchannels, #smarty_tab #smartyam {padding: 8px; border: 1px solid #333; border-radius:3px;} #smarty_tab #blacklistedchannels span{width: 137px; max-height: 16px;cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;} span.add-to-blacklist svg {cursor: pointer;} html.noblacklist span.add-to-blacklist {display:none;} #channel-list div.item div.channel-card:hover .add-to-blacklist {opacity: 1;} .video-views, .video-duration {color: #272727; opacity: 0.8;} span.add-to-blacklist:hover span.blacklist-tooltip { color:#fff; display:inline; } #carousel {${BC.settings.hidecarousel ? "display:none" : "width: 100%; min-height: 210px"};} .plyr__tooltip {color: #000;} #carousel .hidden-md > div .channel-card:hover .action-button {opacity:1;} .channel-banner .name a.userisblacklisted {text-decoration: line-through red;} .night .video-views, .night .video-duration {color: #dbdbdb;} .channel-banner .name .add-to-blacklist {position: relative;left: 10px;} .channel-banner .name:hover .add-to-blacklist {opacity: 1;} .smartybox { position: relative; display: block; width: 100%; } .smartybox:nth-child(2) { width: 132px; } .smartybox input[type="checkbox"], .smartybox input[type="radio"] { width: auto; opacity: 0.00000001; position: absolute; left: 0; margin-left: -20px; } .cbhelper, .radiohelper { top: -4px; left: -8px; display: block; cursor: pointer; position: absolute; user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;} .cbhelper:before, .radiohelper:before { content: ''; position: absolute; left: 0; top: 0; margin: 6px; width: 18px; height: 18px; transition: transform 0.28s ease; border-radius: 5px; border: 1px solid #4d4b4e; } .radiohelper:before { border-radius: 9px; } .radiohelper.r1:before { left: 48px; } .radiohelper.r2:before { left: 88px; } .radiohelper.r3:before { left: 128px; } .cbhelper:after, .radiohelper:after { content: ''; display: block; width: 10px; height: 5px; border-bottom: 2px solid #7bbe72; border-left: 2px solid #7bbe72; -webkit-transform: rotate(-45deg) scale(0); -moz-transform: rotate(-45deg) scale(0); -khtml-transform: rotate(-45deg) scale(0); transform: rotate(-45deg) scale(0); position: absolute; top: 12px; left: 10px; } .radiohelper.r1:after { left: 58px; } .radiohelper.r2:after { left: 98px; } .radiohelper.r3:after { left: 138px; } .smartybox input[type="checkbox"]:checked ~ .cbhelper::before, .smartybox input[type="radio"]:checked ~ .radiohelper::before { color: #7bbe72; background: linear-gradient(to bottom, #d5d1d833 0%, #93919566 100%)} .smartybox input[type="checkbox"]:checked ~ .cbhelper::after, .smartybox input[type="radio"]:checked ~ .radiohelper::after { -webkit-transform: rotate(-45deg) scale(1); -moz-transform: rotate(-45deg) scale(1); -khtml-transform: rotate(-45deg) scale(1); transform:rotate(-45deg) scale(1); } .smartybox label { cursor: pointer; padding-left: 25px; white-space: nowrap;} .smartybox.radios label { padding-left: 0px; } .smartybox.radios label.r1 { margin-left: 14px; color:#f0af5a !important; } .smartybox.radios label.r2 { margin-left: 18px; color: #559bcc !important; } .smartybox.radios label.r3 { margin-left: 18px; color:#55a47c !important; } .smartybox input[type="checkbox"]:focus + label::before, .smartybox input[type="radio"]:focus + label::before { outline: rgb(59, 153, 252) auto 5px; } .sidebar-recent .playlist_sidebar {margin-bottom: 14px;-webkit-transition: all 1s cubic-bezier(1, 1, 0.5, 1); -moz-transition: all 1s cubic-bezier(1, 1, 0.5, 1); transition: all 1s cubic-bezier(1, 1, 0.5, 1);} .sidebar-recent .playlist_sidebar.slidein {overflow: hidden; max-height: 0px !important; } .sidebar-heading.playlists {position: relative; cursor: pointer; user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;} .sidebar-heading.playlists:after {content: ''; display: block; position: absolute; right: 6px; bottom: 15px; width: 0; height: 0; border-bottom-width: 10px; border-bottom-style: solid; border-top: 10px solid transparent; border-left: 10px solid transparent; border-right: 10px solid transparent; } .sidebar-heading.playlists:after {border-bottom-color: white;} .sidebar-heading.playlists:hover:after {border-bottom-color: lightgray;} .sidebar-heading.playlists:after {-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; transition: all 0.5s ease;} .sidebar-heading.playlists.slidein:after {content: ''; display: block; position: absolute; right: 6px; bottom: 5px; width: 0; height: 0; border-top-width: 10px; border-top-style: solid; border-bottom: 10px solid transparent; border-left: 10px solid transparent; border-right: 10px solid transparent; } .sidebar-heading.playlists.slidein:after {border-top-color: white;} .sidebar-heading.playlists.slidein:hover:after {border-top-color: lightgray;} .plyr.plyr--hide-controls {cursor:none} #volumometer {position: absolute;right: 40px;width: 20px;height: calc(100% - 120px);bottom: 40px;border: 2px solid #aaa;border-right-color: #888;display: flex;background: linear-gradient(to right, #000 0%, #111 60%, #111 60%, #333 100%);opacity: 0;transition: opacity 2s;} #volumometer.change {opacity: 0.8;transition: 0.1s;} #volumometer .vol {bottom: 0px;width: 100%;height: 0px;position: absolute;transition: height 0.1s ease-in 0s;box-shadow: 2px 0px 2px #555;background: linear-gradient(to right, #cdcdcd 0%, #fff 50%, #fff 50%, #888 100%);} #volumometer .percent {position: absolute;right: -30px;width: 80px;height: 80px;top: -60px;text-align: center;color: #333333dd;font-weight: bold;font-size: 2em;text-shadow: 1px 1px #dddddd;pointer-events: none;} #volumometer .percent::after {content: "";display: block;position: absolute;width: 100%;height: 100%;bottom: 15px;left: 0;pointer-events: none;background-image: radial-gradient(circle, #555 10%, #cacaca 20%, transparent 10.01%);background-position: 50%;transform: scale(0, 0);opacity: 0;transition: 0s;} #volumometer.change .percent:after {transform: scale(6, 4);opacity: .2;transition: transform .5s, opacity .35s;} .plyr #autoplay-details {z-index:22; color:#ee3333 !important;} .plyr.plyr--paused button.plyr__control--overlaid.plyr__control--pressed[aria-label="Play"] {opacity:0;visibility:hidden;} #autoplay-next {position:absolute;width: 800px;top: 50%;left: 50%;margin: -100px 0 0 -400px;z-index: 1;} #autoplay-next .video-card-image {width: 240px; height: 135px;opacity: .9;} #autoplay-next .video-card-image .img-responsive:first-child {opacity: .9; border-radius: 10px;} #autoplay-next .video-card-text {max-height:88px;} #autoplay-next .video-card-title {font-size: 12px;height: 45px;max-height: 45px;overflow: hidden;} #autoplay-next .video-card-published {font-size: 12px;margin: 2px 0;} #autoplay-next .video-card {position:absolute;width: 240px;border-radius: 10px;opacity:.9;background:#211f22;box-shadow: 1em 1em 1em 0.7em #000000a0, -0.05em -0.05em 0.1em 0.1em white;} .autoplay-prev {left:0px;} .autoplay-prev img.play-overlay {width: 64px !important;height: 64px !important;transform: scaleX(-0.7) !important;} .autoplay-prev:hover img.play-overlay {transform: scaleX(-1) !important;} .autoplay-next {right:0px;} .autoplay-next img.play-overlay {width: 64px !important;height: 64px !important;transform: scaleX(0.7) !important;} .autoplay-next:hover img.play-overlay {transform: scaleX(1) !important;} #bcframes {opacity: 0; width: 160px; height: 90px; position: absolute; border-radius: 3px; border: 1px solid #555; background-color: #222222aa; overflow: hidden; transform: translate(50%,10px) scale(0); transform-origin: -50% 100%; transition: transform .2s .1s ease,opacity .2s .1s ease; z-index: 130;} #bcframes.visible {opacity: 1; transform: translate(0,0) scale(1); transform-origin: 50% 100%; transition: transform .2s .1s ease,opacity .2s .1s ease;} #screenshot {transition: opacity .5s; background: #222222b3; text-align: center; position: fixed; overflow: hidden; z-index: 2000; opacity: 1; bottom: 0; right: 0; left: 0; top: 0;} #screenshot canvas {top: 50%; z-index: 2001; max-width: 80%; max-height: 80%; position: relative; transform: translateY(-50%); box-shadow: 1em 1em 1em 0.7em #000000a0, -0.01em -0.01em 0.03em 0.03em #aaa;} #screenshot .action {left: calc(50% - 114px); position: absolute; width: 228px; height: 74px; top: 70%; border-radius: 7px; background: linear-gradient(to top, #ffffff88 10%, #22222288 60%); border-color: #222 #555 #555 #222; border-width: 1px; border-style: solid; border-bottom-right-radius: 39px; border-bottom-left-radius: 39px;} #screenshot .cancel, #screenshot .save, #screenshot .edit {width: 100px; height: 28px; display: inline-block; background: linear-gradient(to bottom, #333 0%, #000 100%); border: 1px solid #555; border-radius: 5px; text-align: center; line-height: 1.8em; margin: 6px; cursor: pointer; box-shadow: 0.5em 0.5em 1em 0.1em #00000070, -0.02em -0.02em 0.03em 0.03em #aaaaaaaa;} #screenshot .save a {width: 100%; height: 100%; display: block;} a#takeScreenShot.disabled {pointer-events: none; opacity: 0.3; cursor: default;} #screenshot .cancel:hover, #screenshot .save a:hover {color:#d01105;} #screenshot .edit {width: 28px; font-weight: bold; font-size: 18px; line-height: 1.5em; margin: 2px 4px;} #screenshot .action .edit.two {opacity:0; position: absolute; top: 4px;} #screenshot #editInfo {z-index: 2005; cursor: default; font-size: 22px; padding-left: 1px; line-height: 1.1em; position: absolute; border-radius: 14px; margin: 24px 0 0 28px; user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; box-shadow: 1em 1em 1em 0.1em #00000090;} #screenshot #editInfo:hover:after {top: 100%; z-index: 2011; width: 200px; font-size: 14px; margin-top: 10px; padding: 4px 6px; color: #ffffffdd; position: absolute; border-radius: 4px; content: attr(data); background: linear-gradient(to top, #22222288 10%, #00000088 60%); transform: translateX(-90%); border: 2px solid #555555aa; box-shadow: 0.5em 0.5em 1em 0.2em #000000a0;} #screenshot .action {opacity: 1; z-index: 2010; cursor: move; -webkit-transition: height .5s, opacity .5s; -moz-transition: height .5s, opacity .5s; transition: height .5s, opacity .5s;} #screenshot .action .cancel, #screenshot .action .save, #screenshot .action .edit {visibility: visible; -webkit-transition: visibility 0s, opacity 0.5s linear; -moz-transition: visibility 0s, opacity 0.5s linear; transition: visibility 0s, opacity 0.5s linear; user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;} #screenshot .action.gone {height:40px !important;} #screenshot .action .cancel.gone, #screenshot .action .save.gone {opacity: 0; visibility: hidden; transition: visibility 0s 0.5s, opacity 0.5s linear} #screenshot .action .edit.one.gone {opacity:0 !important; visibility: hidden; width:0px !important; transition: visibility 0s 0.5s, opacity 0.5s linear} #screenshot .action .edit.two {opacity:1;} #screenshot .action .edit.disabled, #screenshot .action input#zoomfactor[disabled] {pointer-events: none; opacity: 0.5; cursor: default;} #screenshot .action .edit.two.gone {opacity:0 !important; visibility: hidden; transition: visibility 0s 0.5s, opacity 0.5s linear} #screenshot .action input#zoomfactor {width:75px; margin-left: -8px;} #screenshot .action input#zoomfactor.gone {display: none} .drag_resize {z-index: 2003; display: none; position: absolute;} .drag_resize.active {display: block;} .drag_resize_overlay, .drag_resize_overlay tbody {width: 100%; height: 100%; z-index: 2004; user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;} .drag_resize_overlay td {border-width: 0px;} .drag_resize_overlay td.corner {width: 21px; height: 21px;${(isChrome) ? ' display: -webkit-box;' : ''}} .drag_resize_overlay td.corner.tl {cursor: nwse-resize; border-left: 1px solid #eeeeeeaa; border-top: 1px solid #eeeeeeaa;} .drag_resize_overlay td.corner.tr {cursor: nesw-resize; border-top: 1px solid #eeeeeeaa; border-right: 1px solid #eeeeeeaa;} .drag_resize_overlay td.corner.br {cursor: nwse-resize; border-right: 1px solid #eeeeeeaa; border-bottom: 1px solid #eeeeeeaa;} .drag_resize_overlay td.corner.bl {cursor: nesw-resize; border-bottom: 1px solid #eeeeeeaa; border-left: 1px solid #eeeeeeaa;} .drag_resize_overlay td.cropper.ct {height: 21px; cursor: ns-resize; border-left: 1px solid #eeeeeeaa; border-top: 1px solid #eeeeeeaa; border-right: 1px solid #eeeeeeaa; color: #fff; font-size: 14px; overflow: hidden; text-align: center;} .drag_resize_overlay td.cropper.cr {width: 21px; cursor: ew-resize; border-top: 1px solid #eeeeeeaa; border-right: 1px solid #eeeeeeaa; border-bottom: 1px solid #eeeeeeaa;} .drag_resize_overlay td.cropper.cb {height: 21px; cursor: ns-resize; border-right: 1px solid #eeeeeeaa; border-bottom: 1px solid #eeeeeeaa; border-left: 1px solid #eeeeeeaa; color: #fff; font-size: 14px; overflow: hidden; text-align: left; padding-left: 15px;} .drag_resize_overlay td.cropper.cl {width: 21px; cursor: ew-resize; border-bottom: 1px solid #eeeeeeaa; border-left: 1px solid #eeeeeeaa; border-top: 1px solid #eeeeeeaa;} .drag_resize_overlay td.corner:hover, .drag_resize_overlay td.cropper:hover {background-color:#ffffff1a;} .drag_resize_overlay td.dragger {cursor: move; overflow: visible; display: inline-flex; scrollbar-width: none; background-image: linear-gradient(90deg, #eeeeeeaa 50%, #11111199 50%), linear-gradient(90deg, #eeeeeeaa 50%, #11111199 50%), linear-gradient(0deg, #eeeeeeaa 50%, #11111199 50%), linear-gradient(0deg, #eeeeeeaa 50%, #11111199 50%); background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; background-size: 15px 1px, 15px 1px, 1px 15px, 1px 15px; background-position: left top, right bottom, left bottom, right top; animation: borderline 1s infinite linear;} @keyframes borderline {0% {background-position: left top, right bottom, left bottom, right top;} 100% {background-position: left 15px top, right 15px bottom, left bottom 15px, right top 15px;}} .drag_resize_overlay td.dragger::-webkit-scrollbar {display: none;} input#zoomfactor[type=range] {-webkit-appearance: none; margin-left: 100px; width: 100px;} input#zoomfactor[type=range][disabled] {opacity: .2; cursor: default;} input#zoomfactor[type=range]:focus {outline: none;} input#zoomfactor[type=range]::-webkit-slider-runnable-track {width: 100%; height: 6px; cursor: pointer; animate: 0.2s; box-shadow: 1px 1px 1px #000000; background: #aaaaaa77; border-radius: 5px; border: 1px solid #000000;} input#zoomfactor[type=range]::-webkit-slider-thumb {box-shadow: 1px 1px 1px #000000; border: 1px solid #000000; height: 16px; width: 10px; border-radius: 5px; background: currentColor; cursor: pointer; -webkit-appearance: none; margin-top: -6px;} input#zoomfactor[type=range]:focus::-webkit-slider-runnable-track {background: #3071A9;} input#zoomfactor[type=range]::-moz-range-track {width: 100%; height: 6px; cursor: pointer; animate: 0.2s; box-shadow: 1px 1px 1px #000000; background: #aaaaaa77; border-radius: 5px; border: 1px solid #000000;} input#zoomfactor[type=range]::-moz-range-thumb {box-shadow: 1px 1px 1px #000000; border: 1px solid #000000; height: 16px; width: 10px; border-radius: 5px; background: currentColor; cursor: pointer;} #screenshot #shader {opacity: .6; z-index: 2002; position: absolute; transition: opacity .5s; background-position: left top, right bottom, left bottom, right top; background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; background-image: linear-gradient(#000, #000), linear-gradient(#000, #000), linear-gradient(#000, #000), linear-gradient(#000, #000);} #screenshot #shader.transparent, #screenshot .action.transparent {opacity: 0 !important;}`; if (BC.settings.hidemenubar) { style.innerText += ` #nav-top-menu {position: static; width: 100%; height: 60px;} #nav-menu-buffer {height: 0px; padding-top: 0px !important;} html.topNavfloat #nav-top-menu, html.tabNavfloat .tab-scroll-outer {-webkit-transition: top 0.5s ease-in-out; -moz-transition: top 0.5s ease-in-out; -khtml-transition: top 0.5s ease-in-out; transition: top 0.5s ease-in-out;} html.topNavfloat #nav-top-menu {position: fixed;} html.tabNavfloat .tab-scroll-outer {position: fixed; width: 100%; z-index:989; background: #fff;} html.tabNavfloat.night .tab-scroll-outer {background: #211f22;} html.topNavfloat #nav-menu {padding-top: 60px;} html.tabNavfloat #page-detail .tab-content {margin-top: 50px;} html.tabNavfloat #page-detail #listing-trending {margin-top: -50px;} html.tabNavfloat #nav-side-menu {z-index:999;}`; } if (BC.settings.playlists || BC.settings.mvplaylist) { style.innerText += ` .mvplaylist.row, .playlist.row {width: 723px;margin-top:20px;margin-bottom:20px;} .plslider, .mvslider {width:100%;max-width: 878px; padding-left:35px;margin: auto 0px; overflow:hidden;display: inline;} .mvplaylist .playlist-title, .playlist .playlist-title {display:inline-block; width: auto !important; margin: 20px 37px 10px;} #comment-frm-container {margin-top: 20px !important;} .mvplaylist .playlistbt, .playlist .playlistbt {width: 30px; height: 195px; padding-top: 85px; background-color: #f3f3f3; position: absolute; z-index: 78; } .night .mvplaylist .playlistbt, .night .playlist .playlistbt {background-color: #211f22;} .plslider, .mvslider {-webkit-transition: margin-left 0.25s ease-in-out; -moz-transition: margin-left 0.25s ease-in-out; -khtml-transition: margin-left 0.25s ease-in-out; transition: margin-left 0.25s ease-in-out;} .playlistup {margin-left:693px; background: linear-gradient(to right, #BBB 0%,#DDD 100%); border-bottom-right-radius: 20px 40px; border-top-right-radius: 20px 40px;} .playlistdn {background: linear-gradient(to left, #BBB 0%,#DDD 100%); border-bottom-left-radius: 20px 40px; border-top-left-radius: 20px 40px;} .night .playlistup {background: linear-gradient(to right, #2c2a2d 0%,#544e53 100%);} .night .playlistdn {background: linear-gradient(to left, #2c2a2d 0%,#544e53 100%);} .playlistbtn:not(.disabled):hover {background: radial-gradient(ellipse at center, #BBB 0%,#DDD 100%);} .night .playlistbtn:not(.disabled):hover {background: radial-gradient(ellipse at center, #2c2a2d 0%,#544e53 100%);} .playlistbtn {cursor:pointer;width: 30px;height:195px;padding-top:85px;background-color: #ddd;text-align:center;position: absolute; z-index: 80;margin-top: 5px;} .playlistbtn b {cursor:pointer; user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none;} .playlistbtn.disabled {cursor:default; opacity:0.3;} .playlistbtn.disabled b {color: #ddd;cursor:default;} .playlist-title span {margin-left:16px;} .playlist-title span:hover {color:#ffaa00;} .video-card-published.sequence {position: absolute;bottom: 0px;right: 3px; z-index:50;} .playlist svg.fa-square {opacity: 0.4;} .mvplaylist .playlist-card, .playlist .playlist-card {width: 208px;height:195px;margin: 5px;} .night .playlistbtn {background-color: #2c2a2d; background:} .playlist-card .video-card-title {height: 52px; width: 200px; max-height: 52px; max-width: 200px; cursor: pointer; overflow: hidden; display: block;} .playlist-card .video-card-title a {font-size: 13px; font-weight: 500;} .playlist-card.active .video-card-title {max-height: 47px;} .night .playlistbtn.disabled b {color: #2c2a2d;} @media (min-width: 768px) {.plslider, .mvslider {max-width: 660px;} .playlistup {margin-left:475px;}.mvplaylist.row, .playlist.row {width: 505px;}} @media (min-width: 992px) {.plslider, .mvslider {max-width: 878px;} .playlistup {margin-left:693px;}.mvplaylist.row, .playlist.row {width: 723px;}}`; } if (BC.settings.hidedonationbar) style.innerText += '.video-container .text-center {display: none !important;}'; if (BC.settings.hidecookienotice) style.innerText += '#alert-cookie {display: none !important;}'; if (BC.settings.hidesignupnotice) style.innerText += '#alert-signup {display: none !important;}'; if (BC.settings.usesquareicons) style.innerText += '.channel-banner .image-container {border-radius:0px !important;}'; if (BC.settings.hideadverts) { style.innerText += '.sidebar .rcad-container, .sidebar > div:not(.sidebar-video) {display:none !important;}'; let affiliates = null; if (affiliates = qs('.affiliate-container')) { affiliates.outerHTML = '' } } if (BC.settings.useminiplayer) style.innerText += 'button.plyr__control[data-plyr="pip"] {display: none !important;}'; d.documentElement.appendChild(style); if (BC.settings.hidemenubar) w.addEventListener('scroll', BC.floatHeaders); BC.addBrowserSearch(); BC.loaded = 1; debug('>>>>>>>>>>>>>> BC load <<<<<<<<<<='); } else debug('>>>>>>>>>>>>>> BC reload <<<<<<<<<<='); if (BC.watchpage) { BC.page = 'watchpage'; BC.player.api = qs('video#player'); if (isChrome) { BC.player.api.crossOrigin = "Anonymous";/* for webkit CORS*/ let src = qs("source", BC.player.api).src; qs("source", BC.player.api).src = src; BC.player.api.load(); if (BC.player.autoplay) BC.player.api.play(); } /* Provide mini player */ if (BC.player.api !== null) { if (!BC.player.rect) { w.scrollTo(0, 0); BC.player.rect = BC.player.api.getBoundingClientRect(); } BC.player.api.mini_point = BC.player.rect.top + ((BC.player.rect.height / 2) + 50); BC.origVid = { w: Math.round(BC.player.rect.width * 10) / 10, h: Math.round(BC.player.rect.height * 10) / 10, r: Math.round(BC.player.rect.width/BC.player.rect.height * 1000) / 1000 }; if (!BC.miniPlayerIni && BC.settings.useminiplayer) { GM.getValue('miniplayer', "{}").then( (value) => { if (value && value != '{}') { BC.miniplayer = JSON.parse(value); w.addEventListener("scroll", BC.miniPlayer, false); d.addEventListener("fullscreenchange", (e) => { BC.onFullScreen(e)}); d.addEventListener("mozfullscreenchange", (e) => { BC.onFullScreen(e)}); d.addEventListener("webkitfullscreenchange", (e) => { BC.onFullScreene(e)}); let style = dce("style"); style.type = "text/css"; style.innerText = ` html:not(.isfullscreen).s-marty-miniplayer video#player, html:not(.isfullscreen).s-marty-miniplayer .plyr__video-wrapper, html:not(.isfullscreen).s-marty-miniplayer .plyr--video {opacity: 0.94;} html:not(.isfullscreen).s-marty-miniplayer .video-container .wrapper {position: fixed;z-index: 100;background-color:transparent; border:1px solid rgba(255,255,255,0.3);} html:not(.isfullscreen).s-marty-miniplayer #s-marty-miniplayer-bar {display : block;cursor: move; height: 40px; left: -3px; right: 5px; top: -6px; position: absolute;z-index: 110;background-color:transparent;} html:not(.isfullscreen).s-marty-miniplayer #s-marty-miniplayer-bar:hover {background-color:#000; opacity: 0.4; background-clip: padding-box; padding: 6px 0 0 6px;} html:not(.isfullscreen).s-marty-miniplayer #s-marty-miniplayer-size {display : block;cursor: nesw-resize; width:7px; height: 7px; right: -3px; top: -3px; position: absolute;z-index: 120;background-color:transparent;} html:not(.isfullscreen).s-marty-miniplayer .plyr__controls button[data-plyr="captions"], html:not(.isfullscreen).s-marty-miniplayer .plyr__controls button[data-plyr="pip"], html:not(.isfullscreen).s-marty-miniplayer .plyr__controls .plyr__menu {display : none !important;} html:not(.s-marty-miniplayer) #s-marty-miniplayer-bar, html:not(.s-marty-miniplayer) #s-marty-miniplayer-size {display : none;} html:not(.isfullscreen).s-marty-miniplayer .plyr__controls imput[data-plyr="volume"] {/*max-width:12% !important; */width: 12% !important;} html:not(.isfullscreen).s-marty-miniplayer .plyr__video-embed iframe, html:not(.isfullscreen).s-marty-miniplayer .plyr__video-wrapper--fixed-ratio video {position: relative !important; } html:not(.isfullscreen).s-marty-miniplayer #volumometer {height: calc(100% - 90px);bottom: 20px;} html.isfullscreen video#player {width: 100% !important; height: !important;}`; d.documentElement.appendChild(style); BC.miniPlayerIni = true; } }).catch (error => { error('miniplayer: Error in GM.getValue promise: '+ error) }); } if (!qs("#s-marty-miniplayer-bar")) { BC.player.fur = qs(".video-container .wrapper"); let bar = dce("div"); bar.setAttribute('id', 's-marty-miniplayer-bar'); bar.addEventListener("mousedown", BC.moveMiniPlayer, true); let size = dce("div"); size.setAttribute('id', 's-marty-miniplayer-size'); size.addEventListener("mousedown", BC.sizeMiniPlayer.bind(this), true); BC.player.fur.insertBefore(bar, BC.player.fur.firstChild); BC.player.fur.insertBefore(size, BC.player.fur.firstChild); BC.player.api.volume = BC.player.volume; BC.player.fur.parentNode.style = `width:${BC.origVid.w}px;height:${BC.origVid.h}px;`; } /* Autoplay videos */ if (BC.player.autoplay) { if (! BC.startButton) { BC.startButton = qs('button[aria-label="Play"]'); BC.player.api.autoplay = true; if (qs('.plyr__controls imput[data-plyr="volume"]')) { qs('.plyr__controls imput[data-plyr="volume"]').removeAttribute('hidden'); // Volume qs('.plyr__controls .plyr__volume button').removeAttribute('hidden'); // Mute } } if (BC.player.api.paused) { BC.player.api.play() .catch( function(e) { BC.startButton.dispatchEvent( new MouseEvent('click', {bubbles: true, cancelable: true})) }) } } else { BC.player.api.autoplay = false; if (!BC.player.api.paused) BC.player.api.pause(); } if (!qs("video#player.bc")) { /* Video errors */ qs('progress.plyr__progress__buffer').style = ''; qs('div.plyr__progress').title = ''; if (isChrome) { if (isNaN(BC.player.api.duration)) { w.setTimeout(() => { if (BC.player.api.readyState === 0 && isNaN(BC.player.api.duration)) { let err = null, f = '', n = parseInt(BC.player.api.children[0].attributes.dl.value); try { err = Bcd.src.videos[n].error; f = Bcd.src.videos[n].url} catch (e) { err = 'Undefined video error' } if (err) { qs('progress.plyr__progress__buffer').style.backgroundColor = 'rgba(255,255,60,.80)'; qs('div.plyr__progress').title = err; error(`Media error ${err} ${f}`); } } }, 3000) } } else { BC.player.api.addEventListener('error', function(e) { let err = ''; if (BC.player.api.error) { if (BC.player.api.error.code == BC.player.api.error.MEDIA_ERR_NETWORK) err = 'File error'; else if (BC.player.api.error.code == BC.player.api.error.MEDIA_ERR_DECODE) err = 'Video file is corrupt'; else if (BC.player.api.error.code == BC.player.api.error.MEDIA_ERR_SRC_NOT_SUPPORTED) err = 'Video file is incompatable'; } w.setTimeout((e, err) => { let f = ''; if (!err) { try { let n = parseInt(e.target.attributes.dl.value); err = Bcd.src.videos[n].error; f = Bcd.src.videos[n].url} catch (e) { err = 'Undefined video error' } } qs('progress.plyr__progress__buffer').style.backgroundColor = 'rgba(255,255,60,.80)'; qs('div.plyr__progress').title = (err || "Undefined video error"); error(`Media error ${err || "undefined"} ${f}`); }, 3000, e, err) }, true); } if (!qs("#volumometer")) { let volInd = dce("div"); volInd.id = "volumometer"; volInd.innerHTML = '
'; qs(".wrapper .plyr").appendChild(volInd); BC.player.api.addEventListener('volumechange', function(e) { let volume = Math.round(e.target.volume / 0.01) * 0.01; BC.savePlayerValue('volume', volume); if (qs(".plyr").classList.contains("plyr--hide-controls")) { qs("#volumometer .percent").innerText = `${(volume * 100).toFixed()}%`; qs("#volumometer .vol").style.height = `${volume * 100}%`; qs("#volumometer").classList.add("change"); setTimeout(()=>{qs("#volumometer").classList.remove("change")},500); } }, false); w.addEventListener('keydown', BC.catchKey, false); } BC.player.api.addEventListener('timeupdate', function(e){ BC.onPlayerProgress(e) }, false); if (BC.settings.useseekbarpreview) { if (BC.player.api.readyState > 0) BC.getVideoThumbnails({target: BC.player.api}); BC.player.api.addEventListener('loadedmetadata', BC.getVideoThumbnails, false); } BC.player.api.classList.add("bc"); } } let sidebarnext = qs(".sidebar-next"); let playnext = qs("label.sidebar-autoplay:not(.active)"); if (sidebarnext && playnext) { playnext.addEventListener('mousedown', function(e) { if (e.which===1) { let checked = qs("input#autoplay-toggle").checked; BC.savePlayerValue('playnext', !checked); } }, false); playnext.classList.add('active') } if (BC.settings.hidecomments) setTimeout(BC.hideComments, 2000); if (BC.playlist) { BC.playlist = BC.playlist.match( /[&?]+list=([^&]*[a-z0-9_-]+)/i )[1]; BC.addMoreRecentVideos(-1, BC.playlist); } else BC.addMoreRecentVideos(8); if (BC.settings.mvplaylist) BC.addMostViewedPlaylist(); if (BC.settings.playlists) BC.addChannelPlaylists(); if (BC.settings.useblacklist) BC.applyChannelBlacklist(); let link = Bcd.addVideoAction("takeScreenShot", "Take Screen Shot", BC.screenshotIcon); Bcd.addTooltip(link, Bcd.tooltip.length); /* screenshot link */ link.addEventListener('click', BC.takeScreenShot, false); BC.setChannelFeed('add'); BC.addPublishDate(); BC.player.api.focus(); /* keycode listening */ } else if (BC.channelpage) { BC.page = 'channelpage'; if (d.cookie.indexOf('sensitivity=') !=-1 && w.location.search.indexOf('showall=1') ==-1) { d.cookie = "sensitivity=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT"; } let sensitivityWarning; if (sensitivityWarning = qs('.sensitivity-warning a')) sensitivityWarning.addEventListener('click', BC.addSensitivityCookie, false); if (BC.settings.useblacklist) BC.applyChannelBlacklist(); BC.setChannelFeed('add'); } else if (BC.homepage || BC.categorypage) { BC.page = 'homepage'; if (BC.settings.useblacklist) { let listingTabs = qs('#listing-tabs.listening'); let listingsAll = qs('#listing-all > div.row'); let listingsPopular = qs('#listing-popular > div.row'); BC.listingsAllHeight = Math.round(listingsAll.getBoundingClientRect().height); BC.listingsPopHeight = Math.round(listingsPopular.getBoundingClientRect().height); if (!listingTabs) { qs("ul.nav-tabs-list li a[href='#listing-all']") .addEventListener('click', function(e){ BC.applyBlacklist('#listing-all > div.row > div', 'all') }, false); qs("ul.nav-tabs-list li a[href='#listing-popular']") .addEventListener('click', function(e){ BC.applyBlacklist('#listing-popular > div.row > div', 'popular') }, false); qs("ul.nav-tabs-list li a[href='#listing-trending']") .addEventListener('click', function(e){ BC.applyBlacklist('div#trending-day > div.row > div,div#trending-week > div.row > div,div#trending-month > div.row > div', 'trending') }, false); qs("ul.nav-tabs-list li a[href='#listing-subscribed']") .addEventListener('click', function(e){ BC.navsIni('subscribedpage') }, false); addListener(listingsAll, function(e) { let newlistings = qs('#listing-all > div.row'); let newlistingsHeight = Math.round(newlistings.getBoundingClientRect().height); if (BC.listingsAllHeight < newlistingsHeight) { BC.listingsAllHeight = newlistingsHeight; BC.applyBlacklist('#listing-all > div.row > div'); } },{ childList: true }); addListener(listingsPopular, function(e) { let newlistings = qs('#listing-popular > div.row'); let newlistingsHeight = Math.round(newlistings.getBoundingClientRect().height); if (BC.listingsPopHeight < newlistingsHeight) { BC.listingsPopHeight = newlistingsHeight; BC.applyBlacklist('#listing-popular > div.row > div'); } },{ childList: true }); qs('#listing-tabs').classList.add('listening'); if (!BC.settings.hidecarousel) BC.applyBlacklist('#carousel #channel-list div.item > div,#carousel .hidden-md > div'); } } if (BC.settings.hidecarousel) { // The only way to pause this thing if (qs('#carousel')) qs('#carousel').innerHTML = ''; } if (BC.settings.homepagegotoall) { let preferAll = qs("ul.nav-tabs-list li a[href='#listing-all']"); if (preferAll !== null && preferAll.parentNode.className.indexOf('active') ==-1) { preferAll.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true })); BC.applyBlacklist('#listing-all > div.row > div', 'all'); } } else BC.applyBlacklist('#listing-popular > div.row > div'); BC.setChannelFeed('remove'); } BC.createSmartyButton(); BC.navsIni(); }, applyBlacklist: (selector, page) => { BC.previouslisting = selector; if (page) BC.navsIni(); if (!BC.settings.useblacklist) return; selector = selector.split(',').join(':not([polled]), ') + ':not([polled])'; let i, listings = qsa(selector); if (listings.length) { try { for (i = 0; i < listings.length; i++) { let card = qs('.video-card-channel a, .video-trending-channel a, .channel-card a', listings[i]); if (card) { let href = card.getAttribute("href"); let channel = href.match( /\/channel\/([a-z0-9_-]+)\//i ); if (channel) { if (BC.blacklist.find( id => id[0] == channel[1] )) { listings[i].outerHTML = '' } else { listings[i].setAttribute('polled', channel[1]); let button = BC.blacklistButton(); let videoCard = qs('.video-card, .video-trending-image, .channel-card', listings[i]); let name = qs('.channel-card-title', listings[i]); name = name ? name.innerText : card.innerText; videoCard.appendChild(button); button.addEventListener('click', function(e){ BC.blacklistAdd(e, channel[1], name) }, true); } } } } } catch (e) {error('applyBlacklist: '+ e)} } }, applyChannelBlacklist: () => { let card = qs('.channel-banner .name a'), name = card.innerText; if (card) { try { let href = card.getAttribute("href"); let channel = href.match( /\/channel\/([a-z0-9_-]+)\//i ); if (channel) { if (BC.blacklist.find( id => id[0] == channel[1] )) { card.setAttribute('title', name +' is blacklisted ☺'); card.classList.add('userisblacklisted') } else if (! qs('.add-to-blacklist', card.parentNode)) { let button = BC.blacklistButton(); card.parentNode.appendChild(button); button.addEventListener('click', function(e){ BC.blacklistAdd(e, channel[1], name); this.previousSibling.classList.add('userisblacklisted'); this.previousSibling.setAttribute('title', name +' is blacklisted ☺'); this.style.display = 'none'; }, true); } } } catch (e) {error('applyChannelBlacklist: '+ e)} } }, createSmartyButton: () => { let i, blacklisted, menu, smarty, colors; let blContent = ''; let donate = ''; let tabContent = `Smarty `; menu = qs('ul.nav-tabs-list'); smarty = qs('#smarty_tab'); if (smarty === null) { smarty = dce("li"); smarty.innerHTML = tabContent; menu.appendChild(smarty); blacklisted = qs('#blacklistedchannels'); if (BC.settings.useblacklist) { if (BC.blacklist.length ) { for (i = 0; i < BC.blacklist.length; i++) { blContent += `${BC.blacklist[i][1]}`; } } else blContent = '${title}
${pdate}
\n${title}
${pchan}
${pdate}
${seqId}\n${title}
${pdate}
${i+1}\n${qs(".video-publish-date b").innerText}
`; BC.prevUp[0].now.views = qs("#video-view-count").innerText; } BC.history += 1; content = dce("div"); content.innerHTML = result.html; BC.nextUp = getHistoryItem(content); BC.prevUp.push(BC.nextUp); resolve() } else reject() } catch (e) { error('XMLHttpRequest playNextFullScreen parsing error: '+ e); reject() } }); xhr.open("POST", url, true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.send(data); } }); } const render = (dir, next) => { let path, card = qs(".sidebar-next .video-card"); BC.closeItem("details"); if (qs("#video-view-count")) qs("#video-view-count").setAttribute("id", "fs-view-count"); if (qs("#video-like-count")) qs("#video-like-count").setAttribute("id", "fs-like-count"); if (qs("#video-dislike-count")) qs("#video-dislike-count").setAttribute("id", "fs-dislike-count"); qs("#fs-view-count").innerHTML = next.count; qs("#fs-like-count").innerHTML = next.likes; qs("#fs-dislike-count").innerHTML = next.dislike; qs(".video-publish-date").innerHTML = next.pdate; qs("#video-hashtags").innerHTML = next.hashtags; if (qs("#disqus_thread")) qs("#disqus_thread").innerHTML = ""; qs(".sidebar-next h2.sidebar-heading").innerHTMl = next.tooltip; qs("#video-description .teaser").innerHTML = next.teaser; qs("#video-description .full").innerHTML = next.full; qs(".video-actions .action-list").innerHTML = ""; next.actions.forEach((o) => {qs(".video-actions .action-list").appendChild(o)}); qsa(".sidebar-recent div.video-card").forEach((o) => {o.parentNode.removeChild(o)}); next.recent.forEach((o) => {qs(".sidebar-recent").appendChild(o)}); qs("a:not(#block_playnext)", card).href = next.link; qs(".video-card-title a", card).href = next.link; qs(".video-card-image img", card).classList.replace("lazyloaded", "lazyload"); qs(".video-card-image img", card).setAttribute("src", next.image); qs(".video-card-image img", card).setAttribute("data-src", next.image); qs(".video-card-image img.play-overlay", card).setAttribute("src", next.now.arrow); qs(".video-card-image .video-views", card).innerText = next.views; qs(".video-card-image .video-duration", card).innerText = next.duration; qs(".video-card-text", card).innerHTML = next.text; qs("#main-content").replaceChild(next.appealScript, qs("#appeal-modal + script")); qs("#main-content").replaceChild(next.reportScript, qs("#report-modal + script")); BC.player.api.pause(); BC.player.api.removeAttribute("autoplay"); let source = dce("source"); source.setAttribute("src", next.src); source.setAttribute("type", next.type); qs("video#player").setAttribute("poster", next.poster); qs(".plyr__poster").style.backgroundImage = `url("${next.poster}")`; if (BC.player.api.readyState < 2) qs(".plyr").classList.add("plyr--stopped"); BC.player.api.replaceChild(source, qs("video#player source")); qsa("video#player track").forEach((o) => {qs("video#player").removeChild(o)}); next.tracks.forEach((o) => {qs("video#player").appendChild(o)}); BC.player.api.load(); qs("#page-bar #video-title").innerText = next.title; path = next.url.match( /(\/video\/[a-z0-9_-]+\/).*/i )[1]; if (path != BC.path) { if (!BC.countsRefreshed) { /* Push the page at going fullscreen */ debug("FullScreen Pushing History 0"); w.history.pushState({'url': BC.url}, '', BC.url); } /* Cant pop history states any longer, so just use the next state repeatedly - forward & back */ debug("FullScreen Replacing History "+ (BC.history)); w.history.replaceState({'url': next.url}, '', next.url); d.title = next.title; setTimeout((path)=>{BC.countsRefreshed = false; BC.refreshCounts(path)}, 1000, path); BC.nextUpLoaded = false; BC.nextUp = {} } } const playsoon = () => { let details = qs(".plyr #autoplay-details"); let detail2 = qs(".wrapper > #autoplay-details"); if (!details) { details = detail2.cloneNode(true); qs(".wrapper .plyr").appendChild(details); details.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); BC.closeItem("details"); return false }, false); } details.classList.remove('hidden'); qs('.timer .spinner', details).classList.add('animate'); qs('.timer .filler', details).classList.add('animate'); qs('.timer .mask', details).classList.add('animate'); detail2.classList.add("hidden"); qs('.timer .spinner', detail2).classList.remove('animate'); qs('.timer .filler', detail2).classList.remove('animate'); qs('.timer .mask', detail2).classList.remove('animate'); BC.playNextFullScreenCancel = setTimeout(() => { if (BC.playNextFullScreenCancel) render("nextUp", BC.nextUp); else BC.closeItem("details"); }, 4800) } const prevnext = () => { let apn; let nu = BC.nextUp.now; let pu = (("undefined" === typeof BC.prevUp[BC.history-2]) ? null : BC.prevUp[BC.history-2].now); let html = `${((!pu) ? "" : `