diff --git a/.gitignore b/.gitignore index 48d9fe44..2d22fb2f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,10 @@ node_modules npm-debug.log build Extension Building +Old Files +badges +cdn + .idea *.iml script.js diff --git a/changelog.html b/changelog.html index 137c4ef0..2196ca83 100644 --- a/changelog.html +++ b/changelog.html @@ -1,3 +1,93 @@ +
NaN
for group chats.hasOwnProperty
, which is a JavaScript function named and it broke things slightly.current_bitrate
if the more accurate player stat is not available.getVideoInfo
function as the new HTML5 player now exposes playback statistics.'; @@ -424,6 +437,6 @@ FFZ.prototype._build_following_popup = function(container, channel_id, notificat out += '
'; popup.innerHTML = out; - container.appendChild(popup); + container.insertBefore(popup, container.firstChild); return popup.querySelector('a.switch'); } \ No newline at end of file diff --git a/src/ui/tooltips.js b/src/ui/tooltips.js index 0f4e263a..93c1fdf9 100644 --- a/src/ui/tooltips.js +++ b/src/ui/tooltips.js @@ -46,7 +46,8 @@ FFZ.prototype.fix_tooltips = function() { for(var obj_id in jQuery.cache) { var obj = jQuery.cache[obj_id]; - if ( obj && obj.data && obj.data.tipsy && obj.data.tipsy.options && typeof obj.data.tipsy.options.gravity !== "function" ) + if ( obj && obj.data && obj.data.tipsy && obj.data.tipsy.options && typeof obj.data.tipsy.options.gravity !== "function" ) { obj.data.tipsy.options.gravity = utils.tooltip_placement(constants.TOOLTIP_DISTANCE, obj.data.tipsy.options.gravity || 's'); + } } } \ No newline at end of file diff --git a/src/utils.js b/src/utils.js index 0385409c..e9b71d6a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -466,8 +466,19 @@ module.exports = FFZ.utils = { if ( typeof pref === "function" ) pref = pref.call(this); - var dir = {ns: pref[0], ew: (pref.length > 1 ? pref[1] : false)}, - $this = $(this), + var dir = {}; + + if ( pref.indexOf('n') !== -1 ) + dir.ns = 'n'; + else if ( pref.indexOf('s') !== -1 ) + dir.ns = 's'; + + if ( pref.indexOf('e') !== -1 ) + dir.ew = 'e'; + else if ( pref.indexOf('w') !== -1 ) + dir.ew = 'w'; + + var $this = $(this), half_width = $this.width() / 2, half_height = $this.height() / 2, boundTop = $(document).scrollTop() + half_height + (margin*2), @@ -478,7 +489,7 @@ module.exports = FFZ.utils = { if ($(window).width() + $(document).scrollLeft() - ($this.offset().left + half_width) < margin) dir.ew = 'e'; if ($(window).height() + $(document).scrollTop() - ($this.offset().top + half_height) < (2*margin)) dir.ns = 's'; - return dir.ns + (dir.ew ? dir.ew : ''); + return (dir.ns ? dir.ns : '') + (dir.ew ? dir.ew : ''); } }, diff --git a/style.css b/style.css index bf8641b3..89670df1 100644 --- a/style.css +++ b/style.css @@ -18,12 +18,14 @@ body > div.tipsy .tipsy-arrow { opacity: 0.8; } cursor: pointer; } +.app-main .ad_leader:empty, body:not(.ffz-show-bits-tags) .bits-tag--container, .ffz-hide-friends nav .friend-list, .ffz-hide-friends .warp__status .js-presence-indicator, .ffz-hide-more-at-twitch nav .tse-content > .warp__list:last-of-type, .ffz-hide-recommended-friends .recommended-friends, .ffz-hide-recommended-channels .js-recommended-channels, +.ffz-hide-promoted-games .promotedGames, .ffz-hide-recent-past-broadcast .recent-past-broadcast, .ffz-hide-view-count .stat.twitch-channel-views, .ffz-minimal-chat-input .chat-interface .emoticon-selector-toggle, @@ -216,56 +218,40 @@ body.ffz-bttv-dark .ffz-ui-toggle.blue.live:hover svg.svg-emoticons path { fill: margin-bottom: -5px; } + +/* Minimal Channel Title */ + +.ffz-minimal-channel-title #broadcast-meta { + height: 25px; + margin: 20px 0; +} + +.ffz-minimal-channel-title #channel #broadcast-meta .profile-link .profile-photo img { + width: 25px; height: 25px; +} + +.ffz-minimal-channel-title #channel #broadcast-meta .info { + padding-top: 25px; + padding-left: 50px; +} + +.ffz-minimal-channel-title #channel #broadcast-meta .info .title { + padding-top: 0; + margin: 0; + left: calc(25px + 1.5rem); + height: 25px; + min-height: 25px; +} + +.ffz-minimal-channel-title #broadcast-meta .profile-photo .goto, +.ffz-minimal-channel-title #broadcast-meta .channel { display: none } + + /* Theater Mode hover bar */ -.ffz-theater-stats .app-main.theatre .player-column:focus #hostmode > div.target-meta, -.ffz-theater-stats .app-main.theatre .player-column:hover #hostmode > div.target-meta, -.ffz-theater-stats .app-main.theatre #channel .player-column:focus #broadcast-meta, -.ffz-theater-stats .app-main.theatre #channel .player-column:hover #broadcast-meta { - background-color: #19191f; - color: #aaa; - - position: absolute; - top: -20px; - left: 10px; - right: 10px; - z-index: 7; - opacity: 0.95; - height: 20px; -} - -.ffz-theater-stats.ffz-sidebar-swap .app-main.theatre .player-column:focus #hostmode > div.target-meta, -.ffz-theater-stats.ffz-sidebar-swap .app-main.theatre .player-column:hover #hostmode > div.target-meta, -.ffz-theater-stats.ffz-sidebar-swap .app-main.theatre #channel .player-column:focus #broadcast-meta, -.ffz-theater-stats.ffz-sidebar-swap .app-main.theatre #channel .player-column:hover #broadcast-meta { - left: 145px; -} - -.ffz-theater-stats .app-main.theatre #hostmode > div.target-meta div.target-title { - padding: 5px 0 2px 5px; -} - -.ffz-theater-stats .app-main.theatre #hostmode > div.target-meta div.target-title, -.ffz-theater-stats .app-main.theatre #channel .player-column #broadcast-meta .info { padding-left: 5px; } - -.ffz-theater-stats .app-main.theatre #hostmode > div.target-meta div.target-title, -.ffz-theater-stats .app-main.theatre #channel .player-column #broadcast-meta .info .title { - font-size: 12px; - line-height: 20px; - color: #dedede; -} - -.ffz-theater-stats .app-main.theatre #hostmode > div.target-meta div.target-title, -.ffz-theater-stats .app-main.theatre #channel .player-column #broadcast-meta .info .title, -.ffz-theater-stats .app-main.theatre #channel .player-column #broadcast-meta .info .title .over { - background-color: rgba(16,16,16,0.3); -} - -.ffz-theater-stats .app-main.theatre #hostmode > div.target-meta .target-user-and-game, -.ffz-theater-stats .app-main.theatre #channel .player-column #broadcast-meta .info .channel, -.ffz-theater-stats .app-main.theatre #channel .player-column #broadcast-meta .info .edit-link, -.ffz-theater-stats .app-main.theatre #broadcast-meta .profile-link { - display: none; +.ffz-theater-stats .app-main.theatre .player-userinfo__game, +.ffz-theater-stats .app-main.theatre .player-controls-top { + display: block } .ffz-theater-stats .app-main.theatre .player-column:focus #hostmode > div.clearfix, @@ -326,7 +312,7 @@ body.ffz-bttv-dark .ffz-ui-toggle.blue.live:hover svg.svg-emoticons path { fill: background-color: #25252a; } -.ffz-theater-stats .app-main.theatre .button.button--icon-only svg path { +.ffz-theater-stats .app-main.theatre .button.button--icon-only:not(.follow-button) svg path { fill: #a68ed2; } @@ -1336,6 +1322,7 @@ img.channel_background[src="null"] { display: none; } .ffz-moderation-card .follow-button { font-size: 0 !important; padding-right: 0 !important; + animation: none !important; } .ffz-moderation-card .button.button--icon-only { @@ -2508,8 +2495,8 @@ li[data-name="following"] a { transition: margin-bottom .2s ease-out, padding-bottom .2s ease-out; } -.ffz-classic-player:not(.ffz-top-conversations) .app-main.theatre .player .player-controls-bottom, -.ffz-classic-player:not(.ffz-top-conversations) .app-main.theatre .player[data-controls=true] .player-controls-bottom, +.ffz-classic-player:not(.ffz-top-conversations):not(.ffz-theatre-conversations) .app-main.theatre .player .player-controls-bottom, +.ffz-classic-player:not(.ffz-top-conversations):not(.ffz-theatre-conversations) .app-main.theatre .player[data-controls=true] .player-controls-bottom, .ffz-classic-player .app-main.theatre .player[data-fullscreen="true"] .player-controls-bottom, .ffz-classic-player .app-main.theatre .player[data-fullscreen="true"][data-controls=true] .player-controls-bottom { padding-bottom: 0; @@ -2526,7 +2513,7 @@ li[data-name="following"] a { margin-bottom: 0; } -.ffz-classic-player:not(.ffz-top-conversations) .app-main.theatre .player-column:hover .player[data-fullscreen="false"] .player-controls-bottom { +.ffz-classic-player:not(.ffz-top-conversations):not(.ffz-theatre-conversations) .app-main.theatre .player-column:hover .player[data-fullscreen="false"] .player-controls-bottom { padding-bottom: 40px; } @@ -2816,6 +2803,7 @@ body:not(.ffz-top-conversations) .conversations-list-bottom-bar { .user.item .actions .notifications { flex-grow: 1; + padding: 0; } .user.item .actions button:hover, @@ -2842,7 +2830,7 @@ body:not(.ffz-top-conversations) .conversations-list-bottom-bar { } .user.item .actions .follow svg { - margin: 4.5px 0 -4.5px -1px; + margin: 4px 0 -5px -5.5px; } /* Creative Directory */ @@ -2913,13 +2901,17 @@ body:not(.ffz-creative-showcase) .ct-spotlight-container { display: none; } /* Banned and Spoiler Games */ -.ffz-game-spoilered .thumb .cap img, body:not([data-current-path^="directory.csgo"]):not([data-current-path^="directory.game"]):not([data-current-path^="directory.creative"]) .ffz-game-banned { display: none } -.ffz-game-spoilered .thumb .cap { - position: absolute !important; top: 0; left: 0; bottom: 0; right: 0; - background: url("https://static-cdn.jtvnw.net/ttv-static/404_preview-320x180.jpg") no-repeat !important; - background-size: cover !important; +.ffz-game-spoilered .thumb .cap img { visibility: hidden } + +.ffz-game-spoilered .thumb .cap:after { + position: absolute; + top: 0; left: 0; + bottom: 0; right: 0; + background: url("https://static-cdn.jtvnw.net/ttv-static/404_preview-320x180.jpg") no-repeat #64439a; + background-size: cover; + content: ''; } .directory_header .ffz-block-button, @@ -2983,7 +2975,7 @@ body.ffz-bttv #ffz-feed-tabs .tabs { margin-bottom: 0 } /* New Sidebar */ -.ffz-hide-friends-collapsed .drawer--summary.closed .friend-list { display: none } +.ffz-hide-friends-collapsed .drawer.closed .friend-list { display: none } .warp__anchor { height: 5.5rem } @@ -3181,4 +3173,18 @@ body.ffz-bttv #ffz-feed-tabs .tabs { margin-bottom: 0 } .bttv-incompatibility b + b:before { content: ', '; font-weight: normal; +} + +/* Chat Rules */ + +.ember-chat .chat-interface .chat-rules { + z-index: 1; +} + +.theatre .chat-interface .chat-rules, +.chat-container.dark .chat-rules, +.chat-container.force-dark { + background: #101010; + color: #ccc; + border-color: rgba(255,255,255,0.2); } \ No newline at end of file