Warning: fopen(/www/sites/update.greasyfork.icu/index/store/temp/3c30ee186300c230b89afff7e7de1dd8.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript== // @name ShinjukuWatch // @namespace https://github.com/segabito/ // @description 新しい原宿 略して新宿 // @include http://www.nicovideo.jp/watch/* // @include http://www.nicovideo.jp/mylist_add/video/* // @version 1.9.5 // @grant none // @downloadURL https://update.greasyfork.icu/scripts/452/ShinjukuWatch.user.js // @updateURL https://update.greasyfork.icu/scripts/452/ShinjukuWatch.meta.js // ==/UserScript== // 1.6.0 // - 本家の初期化処理の仕様が変わったので対応 // 1.5.0 // - オススメ欄にとりあえずマイリストボタンを追加 // 1.4.0 // - ウィンドウサイズに合わせてプレイヤーを大きくする機能を追加 (中画面は変わらない) // 1.3.20 // - オススメタブだけ有効にするモードを追加 (WatchItLaterやCustomGinzaWatchと併用する用途など) // 1.3.19 // - 本家の仕様変更で再生終了時にフルスクリーン解除されるようになったのでShinjukuWatch側の処理を削除 // ver1.3.18 // ver1.3.17 // - 本家の仕様変更に対応 // ver1.3.16 // - ニコメンドまわりのコード除去 // ver1.3.15 // - 初回起動時に操作パネルの位置をリセットしない設定を追加(上級者用) // ver1.3.13 // - ヘッダ開閉を少しわかりやすく // ver1.3.12 // - 本家側の仕様変更との競合でマイリスト連続再生が動かなくなっていたのを対応 // - コメントの表示非表示状態を記憶するようにした // ver1.3.11 // - なんか増えてたソーシャルボタンを非表示化 する設定を追加 // ver1.3.10 // - 微妙なレイアウト崩れを調整 // ver1.3.9 // - 本家の内部仕様変更に対応 // - Mac版Chromeで初回だけマイリストメニューが見えない問題の暫定対処 // ver1.3.8 // - 自動スクロールが若干軽くなったかも // ver1.3.7 // - 本家の仕様変更に対応 // ver1.3.6 // - 動画選択画面の中央揃え // ver1.3.4 // - 動画選択画面一列表示の時マイリストコメントが出るようにした // - 動画選択画面のサムネを原寸大表示 // ver1.3.3 // - 動画説明文中のURLを自動リンク // ver1.3.2 // - 動画切り換え時にスクロール位置がずれてしまう問題の改善 // - プレイリストを自動で消さない設定の追加 // - 初回ロードにも常に関連動画をロードする設定の追加 (デフォルトはオフ) // - その他細かい挙動修正 // ver1.3.1 // - ブラウザ全画面時にコメント入力欄と操作パネルを自動で隠す設定を追加 // ver1.3.0 // - 設定パネルを追加 // - ShinjukuWatchのCSSを適用しないようにする設定を追加。他のuserstyleと併用できます // ver1.2.5 // - 本家の微妙なCSS変更に対応と今後の布石 // ver1.2.4 // - フルスクリーン解除したときプレーヤーが真ん中に来るようにする (GINZAだとページの一番上に飛ばされる) // - (あまり使う人いないと思うけど)プレイリスト・タグつき全画面表示にした時の細かな不具合を修正 // - プレイリスト・タグつき全画面表示にニュースを消す・プレイリストを自動最小化 // - ?ref=xxx というパラメータ付きのURLでアクセスしたとき、自動で?ref=xxxを除去 (これがあるとブラウザの既読リンクがわからなくなるため) // - ニコニコニュースの通信を切ってみる // ver1.2.3 // - タイプミスでタグ受信無効化が出来てなかった // ver1.2.2 // - コメントパネルの上に再生数表示 // ver1.2.1 // - マイリストの連続再生から飛んできたときは、プレイリストを消さない // ver1.2.0 // - GINZA対応 // ver1.1.1 // - レイアウトの崩れを修正 // - WatchItLaterから、背景ダブルクリックで動画の位置にスクロールを移植 // ver1.1.0 // - 動画が切り替わる時にオススメ動画一覧を更新 // - テレビちゃんメニューのスライドをなくした // ver1.0.0 最初のバージョン (function() { var monkey = (function(){ 'use strict'; window.Shinjuku = { ns: { loader: {} } }; if (!window.WatchJsApi) { if (location.href.indexOf('/mylist_add/video') >= 0) { (function() { if (window.name === 'nicomylistadd') return; var $ = window.jQuery; $('body,table,img,td').css({border:0, margin:0, padding:0, background: 'transparent', overflow: 'hidden'}); $('#main_frm').css({background: 'transparent', paddig: 0, borderRadius: 0}).addClass('mylistPopupPanel'); $('h1:first').hide(); $('table').css({marginTop: '100px'}); if ($('#edit_description').length < 1) { $('#main_frm .font12:first').css({position: 'absolute', margin: 0, top: 0, left: 0, bottom: 0, padding: 0, color: 'red', fontSize: '8pt'}); // ログインしてないぽい return; } $('#box_success').css({position: 'absolute', top: 0, left: 0}); $('#box_success h1').css({color: 'black', fontSize: '8pt', padding: 0}); $('td').css({padding: 0}); $('table:first').css({width: '200px'}); $('table:first td.main_frm_bg').css({height: '20px'}); $('table:first table:first').hide(); $('select') .css({ position: 'absolute', top: 0, bottom: 0, left: 0, fontSize: '11pt', border: 0, margin: 0, 'border-radius': '4px 0 0 4px', width: '100px' }) .addClass('mylistSelect') .find('option[value=new]').remove(); $('select')[0].selectedIndex = $('select')[0].options.length - 1; $('#select_group option:last')[0].innerHTML = 'とりあえずマイリスト'; var submit = document.createElement("input"); submit.className = 'mylistAdd'; submit.type = "submit"; submit.value = "登録"; $(submit) .css({ position: 'absolute', top: 0, right: 0, bottom: 0, width: '50px', fontSize: '10pt', margin: 0, 'border-radius': '0 4px 4px 0', 'border-width': '1px', cursor: 'pointer' }); $('select')[0].parentNode.appendChild(submit); $('#edit_description').hide(); window.document.documentElement.scrollTop = 0; window.document.documentElement.scrollLeft = 0; $('body, html').scrollTop(0); window.close = function() { window.setTimeout(function() { window.location.replace(window.location); }, 3000); return; }; window.alert = function() { // TODO: document.writeやめる document.write('' + arguments[0] + ''); }; })(); } return; } var require = window.require, define = window.define; define('shinjuku/loader/RelatedVideo',['jquery'], function($) { var RelatedVideo = function() { this.initialize.apply(this, arguments); }; RelatedVideo.prototype = { initialize: function() { }, load: function(watchId) { var def = new $.Deferred(); var timeoutTimer = null; window.require('watchapp/init/VideoExplorerInitializer').relatedVideoAPILoader.load( {'video_id': watchId}, function(err, result) { if (timeoutTimer) { window.clearTimeout(timeoutTimer); timeoutTimer = null; } if (err !== null) { return def.reject({message: '通信に失敗しました(1)', status: 'fail', err: err}); } return def.resolve(result); } ); timeoutTimer = window.setTimeout(function() { if (timeoutTimer) { def.reject({message: '通信に失敗しました(2)', status: 'fail', err: 'timeout'}); } }, 30 * 1000); return def.promise(); } }; return RelatedVideo; }); var refreshCommentPanel = function() { var pv = require('watchapp/init/PlayerInitializer').rightSidePanelViewController.getPlayerPanelTabsView(); var cpv = pv._commentPanelView; cpv.resize(); }; define('shinjuku/util/NicoplayerResizer',['jquery', 'lodash'], function($, _) { var NicoplayerResizer = function() { this.initialize.apply(this, arguments); }; NicoplayerResizer.prototype = { initialize: function() { this._customStyleElement = null; this._lastCssName = null; }, run: function() { window.setTimeout($.proxy(function() { this._updateStyle(); this._toggleSize(true); }, this), 0); $(window).on('resize', _.debounce( $.proxy(function() { this._updateStyle(); refreshCommentPanel(); }, this), 500)); }, _getCssTemplate: function() { var tpl = (function() {/* body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #playerAlignmentArea { width: {$alignmentAreaWidth}px; } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) .w_wide #playerAlignmentArea { width: {$alignmentAreaWideWidth}px; } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #nicoplayerContainer { height: {$playerHeight}px !important; } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #playerNicoplayer { width: {$playerWidth}px !important;} body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #external_nicoplayer { width: {$playerWidth}px !important; height: {$playerHeight}px !important; } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #nicoHeatMapContainer { width: {$playerWidth}px !important; } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #nicoHeatMap { transform: scaleX({$heatMapScale}); -webkit-transform: scaleX({$heatMapScale}); } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #smart_music_kiosk { -webkit-transform: scaleX({$songriumScale}); -webkit-transform-origin: 0 0; } body.size_normal.w_size_custom:not(.videoExplorer):not(.full_with_browser) #inspire_category { left: {$songriumCategoryLeft}px !important; } body.size_normal.w_size_custom:not(.full_with_browser):not(.videoExplorer) #playlist { margin: -10px auto 0; width: {$alignmentAreaWidth}px; } */}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1].replace(/\{\*/g, '/*').replace(/\*\}/g, '*/'); return tpl; }, _isFixedHeader: function() { return !$('body').hasClass('nofix'); }, _isNormalPlayerMode: function() { var $body = $('body'); if ($body.hasClass('full_with_browser') || $body.hasClass('videoExplorer')) { return false; } return true; }, _getPlayerTabWidth: function() { return 326 + 10; // (conf.wideCommentPanel ? PLAYER_TAB_WIDTH_WIDE : PLAYER_TAB_WIDTH); }, _getPlayerTabMargin: function() { return 0; }, _getPlayerHorizontalMargin: function() { return 1.05; // 両端に 2.5% x 2 のマージンがある }, _getProfileSet: function() { return { 'WQHD': [2560, 1440], '1080p': [1920, 1080], 'HD+': [1600, 900], 'WXGA+': [1400, 810], 'WXGA': [1366, 768], '720p': [1280, 720], 'WSVGA+': [1152, 648], 'WSVGA': [1024, 576], 'QHD': [ 960, 540], 'WVGA': [ 854, 480] // 'WVGA-': [ 720, 720 / 16 * 9], // 'VGA-': [ 640, 360], // 'VGA--': [ 480, 480 / 16 * 9], // 'VGA---': [ 512, 512 / 16 * 9] }; }, _getTargetSize: function(targetWidth, targetHeight) { var CONTROL_HEIGHT = 46, INPUT_HEIGHT = 30; var SONGRIUM_WIDTH = 898; var plWidth = Math.round(targetWidth * this._getPlayerHorizontalMargin()); var plHeight = targetHeight + CONTROL_HEIGHT + INPUT_HEIGHT; var alWidth = plWidth + this._getPlayerTabWidth(); return { playerWidth: plWidth, playerHeight: plHeight, alignmentAreaWidth: alWidth, heatMapScale: plWidth / 100, songriumScale: plWidth / SONGRIUM_WIDTH, songriumCategoryLeft: plWidth + 32 }; }, _suggestProfile: function() { var iw = $(window).innerWidth(), ih = $(window).innerHeight(); var hh = (this._isFixedHeader() ? $("#siteHeader").outerHeight() : 0); iw -= this._getPlayerTabWidth(); iw -= this._getPlayerTabMargin(); var profileSet = this._getProfileSet(); ih -= hh; for (var v in profileSet) { var w = profileSet[v][0], h = profileSet[v][1]; if (w * this._getPlayerHorizontalMargin() <= iw && h <= ih) { return {w: w, h: h, name: v}; } } return null; }, _generateCss: function() { var profile = this._suggestProfile(); if (!profile) return {css: '', profile: ''}; var ts = this._getTargetSize(profile.w, profile.h); var css = this._getCssTemplate(); for (var v in ts) { css = css.split('{$' + v + '}').join(ts[v]); } return {css: css, profile: profile}; }, _updateStyle: function() { if (!this._isNormalPlayerMode()) { return; } var result = this._generateCss(); var css = result.css, profile = result.profile, name = profile.name; //if (!name) { return; } console.log('%cプレイヤーサイズ: ' + profile.name, 'background: lightgreen;'); if (this._lastCssName === name) { return; } this._lastCssName = name; if (this._customStyleElement) { console.log('A'); this._customStyleElement.innerHTML = css; } else { console.log('B'); this._customStyleElement = window.Shinjuku.addStyle(css, 'customPlayerSize'); } }, _toggleSize: function(v) { if (typeof v === 'boolean') { $('body').toggleClass('w_size_custom', v); } else { $('body').toggleClass('w_size_custom'); } } }; return NicoplayerResizer; }); window.require([ 'jquery', 'lodash', 'WatchApp', 'watchapp/model/WatchInfoModel', 'watchapp/init/PlayerInitializer', 'watchapp/init/VideoExplorerInitializer', 'watchapp/init/DeflistInitializer', 'watchapp/model/player/NicoPlayerConnector', 'shinjuku/loader/RelatedVideo', 'shinjuku/util/NicoplayerResizer', ], function( $, _, WatchApp, WatchInfoModel, PlayerInitializer, VideoExplorerInitializer, DeflistInitializer, NicoPlayerConnector, RelatedVideo, NicoplayerResizer ) { WatchApp.mixin(window.Shinjuku, { initialize: function() { window.console.time('init Shinjuku'); if (window.WatchJsApi) { // WatchAppだけだとコメント編集画面にも来てしまうため //this.initializeUserConfig(); this._watchInfoModel = WatchInfoModel.getInstance(); this._playerAreaConnector = PlayerInitializer.playerAreaConnector; this._nicoPlayerConnector = PlayerInitializer.nicoPlayerConnector; if (this.config.get('osusumeOnly') || window.WatchItLater) { this.initializeOsusumeOnly(); } else { this.initializeShinjuku(); } } window.console.timeEnd('init Shinjuku'); }, initializeShinjuku: function() { this.initializeTag(); this.initializeVideoExplorer(); this.initializePlayerTab(); this.initializeIchiba(); this.initializeOsusume(); this.initializePlaylist(); this.initializeScroll(); this.initializeQuickMylistFrame(); this.initializeVideoCounter(); this.initializeScreenMode(); this.initializeVideoDescription(); this.initializeSettingPanel(); this.initializeCommentVisibility(); //this.initializePlayerResizer(); this.initializeOther(); //this.initializeCss(); }, initializeOsusumeOnly: function() { console.log('%cosusume Only', 'background: lightgreen;'); this._isOsusumeOnly = true; this.initializePlayerTab(); this.initializeOsusume(); this.initializeSettingPanel(); //this.initializeCss(); // this.osusumeController.refresh(); // $('body').addClass('Shinjuku'); }, addStyle: function(styles, id) { var elm = document.createElement('style'); elm.type = 'text/css'; if (id) { elm.id = id; } var text = styles.toString(); text = document.createTextNode(text); elm.appendChild(text); var head = document.getElementsByTagName('head'); head = head[0]; head.appendChild(elm); return elm; }, initializeCss: function() { var __common_css__ = (function() {/* {* ページの初期化中に横スクロールバーが出るのがうざい *} body:not(.Shinjuku) { overflow-x: hidden; } .osusumeContainer { position: absolute; top: 8px; right: 8px; bottom: 8px; left: 8px; padding: 4px; border: 1px solid #000; overflow: hidden; } .panel_ads_shown .osusumeContainer { bottom: 0px; } .osusumeContainer .osusumeContainerInner { overflow-x: hidden; overflow-y: scroll; height: 100%; } .osusumeContainer li { position: relative; margin-bottom: 8px; padding: 4px; border-bottom: 1px solid #ccc; text-align: left; } .osusumeContainer li a:visited { color: purple; } .osusumeContainer .currentVideoRelated { background: #fff; font-weight: bolder; } .osusumeContainer .previousOsusume { margin-top: 64px; background: #ccc; } .osusumeContainer .thumbnail img { float: left; width: 64px; height: 48px; margin-right: 4px; } .osusumeContainer li p { clear: both; font-size: 80%; text-align: center; } .osusumeContainer li .posted { display: block; font-size: 80%; } .osusumeContainer li .title { font-size: 80%; } .osusumeContainer li .count { font-weight: bolder; margin-right: 8px; } .osusumeContainer li .duration { display: none; font-weight: normal; font-size: 70%; } .osusumeContainer .hasDuration .duration { display: inline; } .osusumeContainer li .duration:before { content: '('; } .osusumeContainer li .duration:after { content: ')'; } .osusumeContainer li:after { content: ''; clear: both; } .osusumeContainer .nextPlayButton { display: none; } .osusumeContainer.withWatchItLater .nextPlayButton { position: absolute; display: inline-block; width: 30px; height: 30px; right: 0; bottom: 0; background: url(http://res.nimg.jp/img/watch_q9/icon_nextplay.png); z-index: 100; cursor: pointer; text-indent: -999em; overflow: hidden; -webkit-transform: scale(1.0); transform: scale(1.0); } .osusumeContainer.withWatchItLater .nextPlayButton:hover { -webkit-transform: scale(1.5); transform: scale(1.5); } .osusumeContainer.withWatchItLater .nextPlayButton:active { -webkit-transform: scale(1.2); transform: scale(1.2); } .osusumeContainer .deflistButton { position: absolute; display: none; width: 30px; left: 4px; top: 54px; z-index: 100; cursor: pointer; overflow: hidden; color: #333; text-align: center; -webkit-transform: scale(1.0); transform: scale(1.0); border: 1px outset; background-color: #ccc; } .osusumeContainer li:hover .deflistButton { display: inline-block; } .osusumeContainer .deflistButton:active { border: 1px inset; } .osusumeContainer.waiting-api ul *, .osusumeContainer.waiting-timer ul * { opacity: 0.5; cursor: wait; } .osusumeContainer .message { position: absolute; bottom: -30%; left: 10%; width: 80%; z-index: 1000; color: white; border: 1px solid #000; font-weight: bolder; font-size: 12pt; text-align: center; word-break: break-all; opacity: 0; transition: opacity 0.4s ease-in-out, bottom 0.4s ease-in-out, box-shadow 0.4s ease-in-out, background 0.4s ease-in-out; } .osusumeContainer.showMessage .message { opacity: 0.8; bottom: 30%; box-shadow: 4px 4px 4px #000; } .osusumeContainer.deflistSuccess .message { background: #080; } .osusumeContainer.deflistFail .message { background: #800; } .quickMylistFrame { position: fixed; left: -9999px; } .quickMylistFrame.updating { position: fixed !important; left: -9999px; opacity: 0; visibility: hidden; z-index: -1; } #videoHeader .videoCounter { display: none; } #playerAlignmentArea .playerBottomButton { display: none; } .shinjukuSettingMenu a { font-weight: bolder; } #shinjukuSettingPanel { position: fixed; bottom: 2000px; right: 8px; z-index: -1; width: 500px; background: #f0f0f0; border: 1px solid black; padding: 8px; transition: bottom 0.4s ease-out; } #shinjukuSettingPanel.open { display: block; bottom: 8px; box-shadow: 0 0 8px black; z-index: 10000; } #shinjukuSettingPanel .close { position: absolute; cursor: pointer; right: 8px; top: 8px; } #shinjukuSettingPanel .panelInner { background: #fff; border: 1px inset; padding: 8px; min-height: 300px; overflow-y: scroll; max-height: 500px; } #shinjukuSettingPanel .panelInner .item { border-bottom: 1px dotted #888; margin-bottom: 8px; padding-bottom: 8px; } #shinjukuSettingPanel .panelInner .item:hover { background: #eef; } #shinjukuSettingPanel .windowTitle { font-size: 150%; } #shinjukuSettingPanel .itemTitle { } #shinjukuSettingPanel label { } #shinjukuSettingPanel small { color: #666; } #shinjukuSettingPanel .expert { margin: 32px 0 16px; font-size: 150%; background: #ccc; } {* ニュース消す *} #content.noNews #textMarquee { display: none !important; } #videoTagContainer .tagInner #videoHeaderTagList li { margin: 0 18px 4px 0; } {* 真・browserFullモード *} body.full_with_browser.hideCommentInput #nicoplayerContainerInner { {* コメント入力欄は動画上表示にするのではなく、画面外に押し出す事によって見えなくする *} margin-top: -10px; margin-bottom: -30px; } #playerContainer { height: auto !important; } #videoTagContainerPin { display: none !important; } {* タグを固定しているか4行以上の時に現われるピン *} .column1 .itemMylistComment { font-size: 85%; color: #666; display: none; color: #400; border: 1px solid #ccc; padding: 0 4px 0px; line-height: 130%; border-radius: 4px; } .column1 .itemMylistComment:before { content: 'マイリストコメント '; background: #ccc; border-radius: 0 0 8px 0; display: inline-block; margin: 0 4px 4px -4px; padding: 2px; } .column1 .itemMylistComment:after { content: ''; } .w_noHover { pointer-events: none !important; } {* ソーシャルボタン *} .area-JP .panel_ads_shown #playerTabContainer.w_noSocial.has_panel_ads .playerTabContent, .area-JP .panel_ads_shown #playerTabContainer.w_noSocial.has_panel_ads .player-tab-content { bottom: 80px; } .area-JP #playerTabContainer.w_noSocial .playerTabContent, .area-JP #playerTabContainer.w_noSocial .player-tab-content { bottom: 4px; } #playerTabContainer.w_noSocial .playerTabAds { bottom: 0; } #playerTabContainer.w_noSocial .socialButtons{ display: none; } .w_noSocial .nicoSpotAds { bottom: 8px; } #playerTabContainer.osusumeTab .playerTabHeader .playerTabItem, #playerTabContainer .player-panel-tabs .player-tab-header .player-tab-item { width: 108px; } button::-moz-focus-inner { border: 0px; } #videoExplorer .descriptionShort { line-height: 1.5; margin: 0 0 4px; word-break: break-all; clear: both; color: #666; font-size: 93%; } #nicoSpotAdAds >*:nth-child(2) { display: none !imortant; position: fixed; top: -999px; } */}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1].replace(/\{\*/g, '/*').replace(/\*\}/g, '*/'); var __css__ = (function() {/* #videoHeaderDetail h2 { letter-spacing: -1px; {* たまに最後の1文字だけ改行されるのを防ぐ *} } #content .videoHeaderTitle { display: inline-block; width: 100%; overflow: hidden; letter-spacing: -1px; text-overflow: ellipsis; white-space: nowrap; } .size_normal #videoHeaderDetail h2 { max-width: 898px; } {*body.Shinjuku #videoHeaderDetail { width: calc(100% - 326px); }*} #topVideoInfo .videoDescription{ border: 1px solid #cccccc; border-radius: 4px 4px 4px 4px; padding: 4px; width: 662px; {* プレーヤーの幅合わせ *} {* max-height: 200px; *} overflow-y: auto; font-size: 12px; } body.size_normal #topVideoInfo .videoDescription { width: 888px; } #videoTagContainer .tagInner #videoHeaderTagList li .tagControlContainer, #videoTagContainer .tagInner #videoHeaderTagList li .tagControlEditContainer { padding: 1px 0; } body:not(.full_with_browser).size_medium #videoTagContainer { width: 672px; min-width: 672px; padding-right: 0; } body:not(.full_with_browser).size_normal #videoTagContainer { width: 898px; min-width: 898px; padding-right: 0; } body #videoTagContainer .tagInner #videoTagContainerPin.active { display: none !important; } {* 余白の除去 *} body:not(.full_with_browser):not(.videoExplorer) #playerContainerWrapper { margin-top: -20px; } #videoHeader #videoHeaderDetail { margin-top: 0 !important; } #videoHeader .videoDetailExpand { height: auto !important; padding: 4px 8px 0; min-height: 32px; } #videoTagContainer { height: auto !important; } body:not(.full_with_browser) #videoTagContainer .tagInner { height: auto !important; bottom: 0px; position: absolute; min-height: 48px; } #videoTagContainer .tagInner #videoHeaderTagList .toggleTagEdit { height: auto; width: 72px; padding: 2px 4px; } #videoTagContainer .tagInner #videoHeaderTagList .toggleTagEditInner { line-height: 22px; white-space: nowrap; } body:not(.full_with_browser) #content #videoTagContainer .tagInner #videoHeaderTagList { padding-left: 85px; } .videoMenuToggle { transform-origin: 100% 100%; -webkit-transform-origin: 100% 100%; transform: scale(0.7); -webkit-transform: scale(0.7); } .videoMenuToggle .tooltipOuter { display: none !important; } .videoDetailToggleButton { cursor: pointer; } {* タイトルクリックでヘッダが開閉できるのをわかりやすく *} .videoDetailToggleButton:hover { text-decoration: underline; } .videoDetailToggleButton:hover:after { content: '▼'; position: absolute; width: 32px; height: 20px; top: 0; bottom: 0; right: -32px; margin: auto; color: #888; font-size: 80%; } .infoActive .videoDetailToggleButton:hover:after { content: '▲'; } .toggleDetailExpand, .shortVideoInfo { display: none !important; } #videoDetailInformation .videoMainInfoContainer { border-top: none; padding-top: 0; {* 説明文のほうに枠線つけたのでいらなそう *} } #topVideoInfo .ch_prof, #topVideoInfo .userProfile { width: 314px; {* コメントパネルの直線上と合わせる *} min-height: 77px; border-radius: 4px; } #topVideoInfo .ch_prof .symbol img, #topVideoInfo .userProfile .usericon{ width: 64px; height: 64px; margin-top: 5px; } .userProfile .userIconContainer { width: 72px; } .userProfile .profile { width: 242px; margin-top: 5px; } #topVideoInfo .parentVideoInfo { width: 314px; border-radius: 4px; } body.channel .ch_prof .info { padding-left: 74px; } {* ソーシャル関連リンクをコメントパネル幅に合わせる *} ul.socialLinks li.socialLinkTwitter { width: 108px; } ul.socialLinks li.socialLinkGoogle { width: 63px; } ul.socialLinks li.socialLinkFacebook { width: 106px; } #content #topVideoInfo .videoMainInfoContainer{ padding: 0; } #content #videoDetailInformation{ border-top: 0; margin-bottom: -12px; } #content .videoInformation{ margin: -4px 0; } #content #topVideoInfo .videoStats { margin: 4px 0 0; } #content #topVideoInfo .videoInfoLeft { margin: 4px 0 -10px; } body:not(.videoExplorer) #videoExplorerExpand { display: none; } body:not(.full_with_browser):not(.videoExplorer) #content:not(.s_showPlaylist) #playlist{ position: absolute; top: -9999px; } body:not(.full_with_browser):not(.videoExplorer) #playlist { margin: -10px auto 0; width: 1008px; } body:not(.full_with_browser):not(.videoExplorer).size_normal #playlist { width: 1234px; } #videoHeaderMenu .searchContainer { margin-top: 1px; } #outline .sidebar { float: none !important; width: auto !important; position: relative !important; clear: both !important; height: 256px; } #outline .sidebar>div:not(#rectangleAd):not(#sideFollowAd) { display: none; } #outline #rectangleAd, #outline #sideFollowAd { position: absolute !important; overflow: hidden; width: 300px !important; height: 256px !important; top: auto !important; bottom: 0 !important; margin: 0 !important; } #outline #rectangleAd { left: 0 !important; right: auto !important; } #outline #sideFollowAd { left: auto !important; right: 0 !important; } {* 背景色 *} body { background: #f4f4f4; transition: background 1s ease 1s; } #outline { background: none !important; } body.Shinjuku,body.Shinjuku { background: #fff; } {* Ginza Grayから真のHarajuku Whiteへの回帰 *} body #playerContainerWrapper { background: none; } {* 下半身いっぱいを市場表示 *} @media screen and (min-width: 1008px) { #outline .main { width: 1008px; } #outline #ichibaMain { width: 1008px; margin: auto; text-align: center;} #outline .outer { width: 1008px; } body.size_normal #outline .main { width: 1234px; } body.size_normal #outline #ichibaMain { width: 1234px; margin: auto;} body.size_normal #outline .outer { width: 1234px; } body #ichibaMain dl { height: 380px; overflow: hidden; display: inline-block; float: none; text-align: left; vertical-align: top; } body.size_medium #ichibaMain dl { margin:0 9px 30px; } body.size_normal #ichibaMain dl { margin:0 10px 30px; } } @media screen and (max-width: 1007px) { #outline .main { width: 100vw; } #outline #ichibaMain { width: 100vw; margin: auto; text-align: center;} #outline .outer { width: 100vw; } body.size_normal #outline .main { width: 100vw; } body.size_normal #outline #ichibaMain { width: 100vw; margin: auto;} body.size_normal #outline .outer { width: 100vw; } body #ichibaMain dl { margin:0 9px 30px; float: inherit; display: inline-block; vertical-align: top; } } #ichibaMain #ichibaMainFooter .commandArea2 { display: none; {* 変な位置に表示されてみっともないので *} } body #ichibaMain dt { height: 60px; } #outline #ichibaMain .rowJustify { display: none; } #outline #ichibaMain #ichibaMainFooter { clear: both; } #footer { z-index: 1;} {* テレビちゃんメニュー スライドをやめる *} body #videoHeader #videoMenuWrapper{ position: absolute; width: 324px; height: auto !important; opacity: 0; transition: opacity 0.4s ease; right: 0px; } body #videoHeader.menuOpened #videoMenuWrapper{ z-index: 1000 !important; border: 1px solid #000; background: white; box-shadow: 0px 0px 4px #000; top: 98px; bottom: auto; opacity: 1; } body #videoHeader.infoActive.menuOpened #videoMenuWrapper{ top: auto; bottom: 48px; } body #videoHeader #videoMenuWrapper .defmylistButton, body #videoHeader #videoMenuWrapper .facebookButton, body #videoHeader #videoMenuWrapper .userChannel, body #videoHeader #videoMenuWrapper .twitterButton { display: none !important; } body #videoHeader #videoMenuTopList{ position: relative; width: auto; } body #videoHeader.menuOpened #videoMenuWrapper .videoMenuList{ display: inline-block; width: 60px; } body #videoHeader.menuOpened .videoShareLinks .socialLinkFacebook{ position: fixed; top: -9999px; visibility: hidden; pointer-events: none !important; } {* テレビちゃんメニューのスライド殺す *} #videoHeader .tvChanMenuHeightController { display: none !important; } body.Shinjuku:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerTabWrapper { height: auto !important; position: absolute; } body.size_medium:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerTabWrapper { bottom: 0px; } body.size_medium:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews .appli_panel #playerTabWrapper { bottom: 19px; } body.size_normal:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerTabWrapper { bottom: 0px; } body.size_normal:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews .appli_panel #playerTabWrapper { bottom: 18px; } body.size_medium:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerAlignmentArea #playerTabContainer { bottom: 0px; } body.size_medium:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerAlignmentArea .appli_panel #playerTabContainer { bottom: 19px; } body.size_normal:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerAlignmentArea #playerTabContainer { bottom: 0px; } body.size_normal:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerAlignmentArea .appli_panel #playerTabContainer { bottom: 19px; } #playerTabWrapper.w_videoInfo #playerTabContainer, #playerTabWrapper.w_ichiba #playerTabContainer, #playerTabWrapper.w_review #playerTabContainer { bottom: 0px !important; } body:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerTabWrapper.w_videoInfo, body:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerTabWrapper.w_ichiba, body:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerTabWrapper.w_review { height: auto !important; position: absolute; bottom: 2px; } body:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerCommentPanel { height: 100% !important; } body:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerContainer.appli_panel #appliPanel { bottom: -18px !important; } body:not(.videoExplorer):not(.setting_panel):not(.full_with_browser) #content.noNews #playerContainer { height: auto; } .Shinjuku .quickMylistFrame { position: absolute; bottom: 13px; top: auto; left: auto; right: 44px; width: 150px; height: 21px; border: 1px solid #ccc; background: #e7e7e7; border-radius: 4px; padding: 8px 4px; } .Shinjuku .quickMylistFrame:hover { } #videoInfo, #videoReview { display: none !important; } body:not(.videoExplorer):not(.full_with_browser).Shinjuku #playerAlignmentArea .playerBottomButton { display: block; } #playerAlignmentArea .playerBottomButton { position: absolute; bottom: -20px; height: 28px; border: 1px outset #888; border-radius: 0 0 8px 8px; cursor: pointer; color: #333; transition: box-shadow 0.4s ease-out; background: #fff; } #playerAlignmentArea .playerBottomButton:hover { box-shadow: 1px 1px 1px #888; bottom: -25px; } #content.s_showPlaylist #playerAlignmentArea .playerBottomButton { bottom: -185px; } #content.s_showPlaylist #playerAlignmentArea .playerBottomButton:hover { bottom: -190px; } #playerAlignmentArea .playerBottomButton:after { content: ' ▼'; } #content.s_showPlaylist #playerAlignmentArea .togglePlaylist:after { content: ' ▲'; } #playerAlignmentArea .openVideoExplorer { left: 120px; width: 64px; } #playerAlignmentArea .togglePlaylist { left: 0px; width: 120px; } #playerAlignmentArea .toggleSetting { left: auto; right: 0px; width: 64px; } #wallImageContainer, #content.w_flat_white #wallImageContainer, #chipWallList, #content.w_flat_white #chipWallList { } {* なんで左に移動するのか? それは、このアイコンのせいで横スクロールバーが出るのが嫌だから *} #content #chipWallList { right: auto; left: -42px; } {* Harajuku Whiteって言ってるけどどう見てもGinza Gray です。 *} .wallAlignmentArea img[src$="harajuku_white.png"], #wallImageContainer div[style*="harajuku_white.png"] { display: none !important; } .wallAlignmentArea.image2 { display: none !important; } body:not(.videoExplorer):not(.full_with_browser) #content #playerContainer.oldTypeCommentInput.controll_panel { min-height: 461px; } body #wallImageContainer { bottom: 10px; top: 10px; height: auto; } #videoHeader .videoCounter { position: absolute; right: 208px; bottom: 11px; width: 116px; font-size: 10px; line-height: 130%; } body:not(.videoExplorer):not(.full_with_browser).Shinjuku #videoHeader .videoCounter { display: block; } #videoHeader .videoCounter li span { font-weight: bolder; float: right; transition: color 1s ease; } #videoHeader .videoCounter li span.update { color: #888; transition: none; } .videoDescription .otherSite { font-weight: bolder; } .squareThumbnail .videoExplorerBody .contentItemList.column1 .video .column1 .title, .videoExplorerBody .videoExplorerContent .suggestVideo .video .column1 .title { white-space: inherit; } {* 動画選択画面のサムネを4:3にする *} body.videoExplorer #videoExplorer.squareThumbnail .column4 .item { text-align: center; } body.videoExplorer #videoExplorer.squareThumbnail .videoInformationOuter { padding-left: 10px; } body.videoExplorer #videoExplorer.squareThumbnail .item .thumbnailContainer, body.videoExplorer #videoExplorer.squareThumbnail .item .thumbnailContainer .link { width: 160px; height: 100px; } body.videoExplorer #videoExplorer.squareThumbnail .item .thumbnailContainer { margin: 0 0px; } body.videoExplorer #videoExplorer.squareThumbnail .item .thumbnailContainer .thumbnail { max-width: 160px; height: auto; top: 0; left: 0 } body.videoExplorer #videoExplorer.squareThumbnail .item .thumbnailContainer img.playingIcon { top: 50%; left: 50%; } body.videoExplorer #videoExplorer.squareThumbnail .uadFrame { width: 160px; height: 100px; background-size: 100% 100%; } .squareThumbnail .uadTagRelated .default .itemList .item .imageContainer { width: 160px; height: 100px; } .squareThumbnail .uadTagRelated .default .itemList .item .imageContainer .videoTitleContainer { width: 160px; text-align: center; } #videoExplorer.squareThumbnail .uadTagRelated { margin-bottom: 30px; } .squareThumbnail .uadTagRelated .default .itemList .item .imageContainer .itemImageWrapper .itemImage { width: 130px; height: auto; top: 0; left: 0; } .squareThumbnail .uadTagRelated .default .itemList .item .imageContainer .itemImageWrapper { width: 160px; height: 100px; } .uadTagRelated .emptyItem .emptyMessageContainer { width: 160px; height: 100px; } .videoExplorerBody .videoExplorerContent .contentItemList .item .thumbnailContainer .nextPlayButton, .videoExplorerBody .videoExplorerContent .suggestVideo .item .thumbnailContainer .nextPlayButton { right: 2px; transition: transform 0.1s ease; -webkit-transition: -webkit-transform 0.1s ease; } .nextPlayButton { transform: scale(1.5); -webkit-transform: scale(1.5); } .sideVideoInfo .nextPlayButton:hover { -webkit-transform: scale(1.5); transform: scale(1.5); } .nextPlayButton:active, .sideVideoInfo .nextPlayButton:active { -webkit-transform: scale(1.2); transform: scale(1.2); } .videoExplorerBody .videoExplorerContent .contentItemList .item .column1 .createdTime { padding-left: 15px; } {* ポイントが無いときは表示しない *} .item:not(.silver):not(.gold) .uadContainer { display: none !important; } #nicoSpotAd>button, #content.panel_ads_shown #miniBannerAd>button{ transform: scale(1.5); -webkit-transform: scale(1.5); } body.size_small.no_setting_panel.videoExplorer #playlist { box-shadow: none; } body.size_small.no_setting_panel.videoExplorer #playerContainerWrapper { box-shadow: none; } {* 動画選択画面のセンタリング *} @media screen and (min-width: 1008px) { body.videoExplorer #bottomContentTabContainer { width: 1008px; margin: auto; } body.size_small.no_setting_panel.videoExplorer #playlist { width: 708px; margin: auto; } body.size_small.no_setting_panel.videoExplorer.content-fix #playlist{ min-width: 708px; } body.size_small.no_setting_panel.videoExplorer #playerContainerWrapper { right: calc(50% + 204px); left: auto; } } .videoExplorerContent { padding: 20px 4px 20px 8px; } #videoHeaderMenu .searchContainer { padding: 0 0 0 5px; right: 0; } .searchContainer .searchText a { border-radius: 4px 0 0 4px; } .searchContainer .searchText button { border-radius: 0 4px 4px 0; } .column1 .itemMylistComment pre { font-family: inherit; display: inline; white-space: pre-wrap; } .item.thumbnailLoadSuccess .noImage, #videoExplorer.squareThumbnail .item .thumbnail { display: none !important; } #videoExplorer .thumbnailContainer { background-size: contain; background-repeat: no-repeat; background-position: center center; } #videoExplorer .item .thumbnailContainer { width: 160px; height: 100px; } #videoExplorer .uadFrame { width: 160px; height: 100px; background-size: 100% 100%; } #videoExplorer .uadTagRelated .default .itemList .item .imageContainer { width: 160px; height: 100px; } {* たまに初期化中に縦にびろーんとなってる犯人がfacebookアイコン *} body:not(.Shinjuku) #videoHeader .videoShareLinks .socialLinkFacebook{ position: fixed; top: -9999px; overflow: hidden; } {* 狭いウィンドウへの対応 *} {* プレイヤー+コメントパネルより狭い時*} @media screen and (max-width: 1023px) { body { min-width: inherit; } body:not(.videoExplorer):not(.full_with_browser) #playerAlignmentArea .playerBottomButton.toggleSetting { right: auto; left: 184px; } body:not(.full_with_browser):not(.videoExplorer) #playlist { width: 100vw; } body.m_windows:not(.full_with_browser):not(.videoExplorer) #playlist { width: calc(100vw - 16px); } body #videoHeader { width: 100vw !important; } body.m_windows #videoHeader { width: calc(100vw - 16px) !important; } body #videoHeaderDetail { width: calc(100vw - 336px); } #topVideoInfo .ch_prof, #topVideoInfo .userProfile { position: absolute; left: 672px; } .userProfile .profile { width: auto !important; } #content .videoInformation .videoStats{ display: none; } #topVideoInfo .parentVideoInfo { margin-left: 8px; } #topVideoInfo .hiddenInfoTabHeader { clear: none; } body #videoHeader #videoMenuWrapper { left: calc(100vw - 326px); right: auto; } body:not(.full_with_browser).size_medium #videoTagContainer { width: calc(100vw - 336px); min-width: inherit; } body.m_windows #videoHeader #videoMenuWrapper { left: calc(100vw - 326px - 16px); } body:not(.full_with_browser).size_medium #videoTagContainer { width: calc(100vw - 336px - 16px); } } {* 中画面よりも狭い時 *} @media screen and (max-width: 672px) { #siteHeader { } #siteHeader #siteHeaderInner { width: 100vw; max-width: 100vw !important; min-width: 100vw !important; } #siteHeaderInner .siteHeaderMenuList>li:nth-child(3) { {* 動画を投稿リンク *} display: none; } #siteHeader #siteHeaderInner .siteHeaderGlovalNavigation { display: none !important; } #siteHeaderUserNickNameContainer { display: none !important; } #siteHeader #siteHeaderInner .siteHeaderMenuList { } #siteHeaderNotification a.siteHeaderUpgrade { display: none !important; } #videoHeaderDetail h2 { } #videoHeaderDetail .videoDetailExpand { display: inline-block; } #videoHeaderMenu .searchContainer { right: -336px; } #topVideoInfo .ch_prof, #topVideoInfo .userProfile { position: relative; float: inherit; left: 0; width: 100vw; margin: 0 0 4px; padding: 0 4px 4px; box-sizing: border-box; } body #videoHeaderDetail { width: 100vw; } #topVideoInfo .videoDescription { width: 100vw; box-sizing: border-box; max-height: 150px; overflow-y: scroll; border: 1px inset; } #content .videoInformation{ display: none; } #topVideoInfo .videoMainInfoContainer .hiddenInfo { box-sizing: border-box; padding: 4px; margin-left: 0; } body:not(.full_with_browser).size_medium #videoTagContainer { width: 100vw; min-width: inherit; } .size_medium #playerAlignmentArea { width: 100vw; } .size_medium #playerTabWrapper { right: -336px; } #content #textMarquee{ width: 100vw !important; } .size_medium #playerAlignmentArea.size_medium #external_nicoplayer, .size_medium #playerAlignmentArea.size_medium #playerNicoplayer { width: 100vw; } #videoHeader .videoCounter { position: static; } .videoMenuToggle { right: auto; left: calc(100vw - 60px); } .Shinjuku .quickMylistFrame { right: auto; left: calc(100vw - 205px); } .m_windows.Shinjuku .videoMenuToggle { left: calc(100vw - 76px); } .m_windows.Shinjuku .quickMylistFrame { left: calc(100vw - 221px); } {* スクロールバー幅だけ引く もっとスマートな方法があるかも *} .m_windows #topVideoInfo .ch_prof, .m_windows #topVideoInfo .userProfile, body.m_windows #videoHeaderDetail, .m_windows #topVideoInfo .videoDescription, body.m_windows:not(.full_with_browser).size_medium #videoTagContainer, .m_windows.size_medium #playerAlignmentArea.size_medium #external_nicoplayer, .m_windows.size_medium #playerAlignmentArea.size_medium #playerNicoplayer { width: calc(100vw - 16px); } #shinjukuSettingPanel { width: 90vw !important; } } {* 開閉時に変なスクロールしてしまう奴 *} #videoHeader.menuOpened #editorMenu { margin-top: 12px !important; } #editorMenu.hidden { display: none; } */}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1].replace(/\{\*/g, '/*').replace(/\*\}/g, '*/'); this.addStyle(__common_css__); if (this.config.get('applyCss') && !this.config.get('osusumeOnly')) { this.addStyle(__css__); } }, initializeUserConfig: function() { var prefix = 'Shinjuku_'; var conf = { noNews: true, noNicoru: true, dblclickAutoScroll: true, autoScroll: true, hideControlInFull: true, autoLoadRelatedVideo: false, hideCommentPanelSocialButtons: true, forceOldTypeControlPanel: true, commentVisible: true, osusumeOnly: false, applyCss: true, autoResizePlayer: false, initializeImmediately: false }; this.config = { get: function(key) { try { if (window.localStorage.hasOwnProperty(prefix + key)) { return JSON.parse(window.localStorage.getItem(prefix + key)); } return conf[key]; } catch (e) { return conf[key]; } }, set: function(key, value) { window.localStorage.setItem(prefix + key, JSON.stringify(value)); } }; }, initializeTag: function() { // タグ自動更新キャンセラー NicoPlayerConnector.onTagDataReceived = function() {}; // タグ領域のピン留め require(['watchapp/init/TagInitializer'], function(TagInitializer) { TagInitializer.tagViewController.tagViewPinStatus.changeStatus(true); }); $('#videoTagContainer').off(); }, initializeVideoExplorer: function() { var self = this; var explorer = VideoExplorerInitializer.videoExplorer; var controller = VideoExplorerInitializer.videoExplorerController; var isSearchMode = function() { return explorer.isOpen(); }; controller.showDeflist_org = controller.showDeflist; controller.showMylist_org = controller.showMylist; controller.showOtherUserVideos_org = controller.showOtherUserVideos; controller.showOwnerVideo_org = controller.showOwnerVideo; controller.searchVideo_org = controller.searchVideo; controller.showDeflist = $.proxy(function() { if (!isSearchMode()) { location.href = "/my/mylist"; return; } this.showDeflist_org(); }, controller); controller.showMylist = $.proxy(function(id) { if (!isSearchMode()) { location.href = "/mylist/" + id; return; } this.showMylist_org(id); }, controller); controller.showOtherUserVideos = $.proxy(function(id, name) { if (!isSearchMode()) { location.href = "/user/" + id; return; } this.showOtherUserVideos_org(id, name); }, controller); controller.showOwnerVideo = $.proxy(function() { if (!isSearchMode()) { location.href = "/user/" + self._watchInfoModel.uploaderInfo.id; return; } this.showOwnerVideo_org(); }, controller); controller.searchVideo = $.proxy(function(word, type) { if (!isSearchMode()) { location.href = (type === 'tag' ? 'tag' : 'search') + "/" + encodeURIComponent(word); return; } this.searchVideo_org(word, type); }, controller); // 動画表示のテンプレート拡張 var $template = $('
').html(VideoExplorerInitializer.videoExplorerView._contentListView._$view.find('.videoItemTemplate').html()); $template.find('.column1') .find('.messageContainer').remove().end() .find('.lastResBody') .before($('

')).end() VideoExplorerInitializer.videoExplorerView._contentListView._$view.find('.videoItemTemplate').html($template.html()); $template = null; // 動画情報表示処理の拡張 var ItemView = require('watchapp/components/videoexplorer/view/content/item/AbstractVideoContentItemView'); ItemView.prototype.update_org = ItemView.prototype.update; ItemView.prototype.update = function() { var item = this._item, $item = this._$item; this.update_org(item); // 動画情報表示をゴリゴリいじる場所 if (item._mylistComment) { // マイリストコメント $item.find('.itemMylistComment').css({display: 'block'}); } var lastResBody = item.getLastResBody(); if (lastResBody.length > 0) { this._$lastResBody.css('cssText', 'display: block !important').text(lastResBody); } else { this._$lastResBody.remove(); } this._$item.find('.thumbnailContainer') .css('background-image', 'url(' + this._$thumbnail.attr('src') + ')'); }; ItemView = null; $('#videoExplorer').addClass('squareThumbnail'); var $openVideoExplorer = $('