"use strict";var _createClass=function(){function a(e,f){for(var h,g=0;gf||f>h[0].offsetWidth*(h.length-1)?this.ended=!0:requestAnimationFrame(this._bindAnim)}return _createClass(a,[{key:"stop",value:function stop(){this.ended||(this.ended=!0,cancelAnimationFrame(this._bindAnim))}},{key:"_anim",value:function _anim(){if(!this.ended){var e=(Date.now()-this.sTime)/this.d,f=this.sl,g=this.x-this.sl;1e&&requestAnimationFrame(this._bindAnim)}}},{key:"_easeOut",value:function _easeOut(e,f,g,h){return e/=h,--e,g*(e*e*e+1)+f}}]),a}(),TJDeck=function(){function a(){_classCallCheck(this,a),this.version="0.0.9",this.$wrap=document.querySelector(".js-app-columns"),this.wrapL=0,this.scrollTask=null,this.options=this.getOptionObj(),this.setOptionFromObj(this.options),this.$options=this.createOptionPanel(),document.body.appendChild(this.$options),this.updateBlur(),this.updateLight()}return _createClass(a,[{key:"getOption",value:function getOption(e,f){var g=localStorage.getItem("tj_deck_"+e);return g?"true"==g:f}},{key:"getOptionObj",value:function getOptionObj(){return{light:this.getOption("light",!0),light_clm:this.getOption("light_clm",!1),blur:this.getOption("blur",!1)}}},{key:"setOption",value:function setOption(e,f){localStorage.setItem("tj_deck_"+e,f)}},{key:"setOptionFromObj",value:function setOptionFromObj(e){for(var f=Object.keys(e),g=0;gj){var l=this._getPosObj(k);if(Math.abs(l.x-e.x)j)){j=null;var p,l=Date.now(),m=g,o=e.x-m.x;0.5<=Math.abs(o)/(l-f)?0e||e>f[0].offsetWidth*(f.length-1)||!isFinite(e)||(this.$wrap.style.transform="translateX("+-e+"px)",this.wrapL=e)}},{key:"getClosestColumn",value:function getClosestColumn(e){for(var h,f=this.getClms(),g=0;g",e.addEventListener("click",this.showDrawer.bind(this)),e}},{key:"createSettingBtn",value:function createSettingBtn(){var e=document.createElement("a");return e.classList.add("tj_setting_btn"),e.href="javascript:void(0)",e.innerHTML="",e.addEventListener("click",this.showOptionPanel.bind(this)),e}},{key:"createOptionPanel",value:function createOptionPanel(){var e=document.createElement("div");return e.classList.add("tj_options"),e.style.display="none",e.innerHTML="\n

TJDeck \u8A2D\u5B9A

\n
\n\t\n\t\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n
\n
\n\t

Script Version: "+this.version+"

\n
\n\n",e.querySelector(".tj_ops_close").addEventListener("click",function(){this.updateOption(),this.hideOptionPanel()}.bind(this)),e}},{key:"hideOptionPanel",value:function hideOptionPanel(){var e=this.$options;e.style.display="none"}},{key:"showOptionPanel",value:function showOptionPanel(){var e=this.$options;this.updateOptionPanel(e),e.style.display=""}},{key:"updateOptionPanel",value:function updateOptionPanel(){var e=this.$options;["light","light_clm","blur"].forEach(function(f){var g=e.querySelector("#tj_ops_"+f);g.checked=this.options[f]}.bind(this))}},{key:"updateOption",value:function updateOption(){var e=this.$options;["light","light_clm","blur"].forEach(function(f){var g=e.querySelector("#tj_ops_"+f);this.options[f]=!!g&&g.checked}.bind(this)),this.setOptionFromObj(this.options),this.updateBlur(),this.updateLight()}},{key:"updateBlur",value:function updateBlur(){this.options.blur?this.$wrap.classList.add("tj_blur"):this.$wrap.classList.remove("tj_blur")}},{key:"updateLight",value:function updateLight(){this.options.light?document.body.classList.add("tj_light"):document.body.classList.remove("tj_light")}},{key:"manageStyle",value:function manageStyle(){this.addStyle();var e=window.innerWidth;window.addEventListener("resize",function(){if(e!=window.innerWidth){var f=document.querySelector("#tj_deck_css");f&&f.remove(),this.addStyle(),this.scrollWrap(this.wrapL*(window.innerWidth/e)),e=window.innerWidth}}.bind(this))}},{key:"refreshStyle",value:function refreshStyle(){}},{key:"addStyle",value:function addStyle(){var e=document.querySelector("head"),f=document.createElement("style");f.type="text/css",f.id="tj_deck_css",f.innerHTML="\nhtml {\n\t/*overscroll-behavior: none; \u30D7\u30EB\u30C0\u30A6\u30F3\u3067\u30EA\u30ED\u30FC\u30C9\u3055\u305B\u306A\u3044 */\n}\n\nbody.tj_light,\nbody.tj_light * {\n\ttransition-duration: 0ms!important;\n}\nbody.tj_light .inline-reply {\n\t/* 0\u306B\u3059\u308B\u3068\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u30A4\u30D9\u30F3\u30C8\u304C\u767A\u751F\u305B\u305A\u306B\u52D5\u4F5C\u304C\u304A\u304B\u3057\u304F\u306A\u308B\u306E\u30671ms */\n\ttransition-duration: 1ms!important;\n}\n\n.js-column-options {\n\tdisplay: none!important;\n}\n.is-options-open .js-column-options {\n\tdisplay: block!important;\n}\n\n/* TJDeck \u30AA\u30D7\u30B7\u30E7\u30F3\u30D1\u30CD\u30EB */\n.tj_options {\n\tposition: fixed;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 1em;\n\tbackground: #fff;\n\tcolor: #222;\n\tz-index: 300;\n}\n.tj_options .title {\n\tmargin-bottom: 1em;\n\tfont-size: 1.1em;\n\tfont-weight: bold;\n\ttext-align: center;\n}\n.tj_options > div {\n\tmargin: 1em 0;\n}\n.tj_options label,\n.tj_options input {\n\tdisplay: inline-block!important;\n\tmargin: 0!important;\n\tvertical-align: middle!important;\n}\n\n\n/* \u30B5\u30A4\u30C9\u30E1\u30CB\u30E5\u30FC\u306E\u8868\u793A\u5207\u66FF */\n.js-app-header {\n\tposition: fixed!important;\n}\n.tj_hide_menu .js-app-header {\n\ttransform: translateX(-50px);\n}\n\n/* \u30E1\u30A4\u30F3\u306E\u4F4D\u7F6E\u3092\u5DE6\u7AEF\u306B */\n.js-app-content {\n\tleft: 0!important;\n}\n\n\n/* \u30B5\u30A4\u30C9\u30D0\u30FC\u304C\u51FA\u305F\u3089\u30CA\u30D3\u3092\u96A0\u3059 */\n.hide-detail-view-inline .tj_nav {\n\tdisplay: none;\n}\n\n.tj_tweet_btn {\n\tposition: fixed!important;\n\twidth: 60px!important;\n\theight: 60px!important;\n\tbottom: 1em!important;\n\tright: 1em!important;\n\tpadding: 0;\n\tbackground-color: #1da1f2;\n\tcolor: #fff;\n\tborder-radius: 36px;\n\tfont-size: 16px;\n\tline-height: 1em;\n\ttext-align: center;\n\tbox-shadow: 1px 1px 5px rgba(0, 0, 0, .5);\n\tz-index: 200;\n}\n.tj_tweet_btn .icon-compose,\n.tj_setting_btn .icon-settings {\n\tdisplay: inline-block;\n\tmargin-top: 0;\n\tfont-size: 20px!important;\n}\n.tj_setting_btn {\n\tposition: fixed;\n\twidth: 50px;\n\theight: 50px;\n\ttop: 0!important;\n\tright: 40px!important;\n\tbackground-color: transparent;\n\tcolor: #333;\n\ttext-align: center;\n\tbox-shadow: none;\n\tz-index: 200;\n}\n.tj_setting_btn > i.icon-settings {\n\tmargin-top: -2px;\n\tline-height: 50px;\n}\n\n.application {\n\tz-index: auto;\n}\n\n/* \u30AB\u30E9\u30E0\u306E\u4F59\u767D\u3092\u306A\u304F\u3059 */\n.app-columns {\n\tpadding: 0!important;\n}\n\n\n/* \u30AB\u30E9\u30E0\u3092\u5E45\u3044\u3063\u3071\u3044\u306B\u8868\u793A */\n.column {\n\twidth: "+document.body.clientWidth+"px!important;\n\theight: "+document.body.clientHeight+"px!important;\n\tmax-width: 600px!important;\n\tmargin: 0!important;\n}\n\n/* \u30AB\u30E9\u30E0\u306E\u8A2D\u5B9A\u3092absolute\u306B */\n.js-column-options-container {\n\tposition: absolute!important;\n\twidth: 100%;\n}\n\n/* \u30B5\u30A4\u30C9\u30D1\u30CD\u30EB\u3092\u8868\u793A\u3057\u305F\u3068\u304D\u306B\u30E1\u30A4\u30F3\u3092\u52D5\u304B\u306A\u304F\u3059\u308B */\n.application > .app-content {\n\tmargin-right: 0!important;\n\ttransform: translateX(0px)!important;\n}\n\n/* \u30E1\u30A4\u30F3\u30A8\u30EA\u30A2\u306E\u30B9\u30AF\u30ED\u30FC\u30EB\u3092\u7981\u6B62 */\n#container {\n\toverflow: hidden!important;\n}\n\n/* \u30B5\u30A4\u30C9\u30D1\u30CD\u30EB\u3092\u5E45\u3044\u3063\u3071\u3044\u306B\u8868\u793A */\n.js-drawer {\n\twidth: "+document.body.clientWidth+"px!important;\n\tmax-width: 600px!important;\n\t/*left: -"+document.body.clientWidth+"px!important;*/\n\tleft: 0!important;\n\ttransform: translateX(-"+document.body.clientWidth+"px);\n}\n.hide-detail-view-inline .js-drawer {/* \u8868\u793A\u4E2D */\n\twidth: "+document.body.clientWidth+"px!important;\n\tmax-width: 600px!important;\n\t/*left: 0!important;*/\n\ttransform: translateX(0);\n\tz-index: 201!important;\n}\n.hide-detail-view-inline .js-drawer:after {\n\tdisplay: none!important;\n}\n\n/* \u30B5\u30A4\u30C9\u30D1\u30CD\u30EB\u306E\u30BF\u30A4\u30C8\u30EB\u3092\u6D88\u3059 */\n.js-docked-compose .compose-text-title {\n\tdisplay: none!important;\n}\n/* \u30A2\u30AB\u30A6\u30F3\u30C8\u9078\u629E\u30A2\u30A4\u30B3\u30F3\u4F4D\u7F6E\u3092\u4E0A\u306B\u305A\u3089\u3059 */\n.js-docked-compose .compose-accounts {\n\twidth: 200px!important;\n\tmargin-top: -50px;\n}\n\n/* \u30C4\u30A4\u30FC\u30C8\u5165\u529B\u30A8\u30EA\u30A2\u3092\u3059\u3053\u3057\u5C0F\u3055\u304F\u3059\u308B */\n.js-docked-compose .compose-text-container {\n\tpadding: 5px!important;\n}\n.js-docked-compose .js-compose-text {\n\theight: 90px!important;\n}\n\n/* \u30C4\u30A4\u30FC\u30C8\u30DC\u30BF\u30F3\u3092\u5927\u304D\u304F */\n.js-docked-compose .js-send-button {\n\twidth: 100px!important;\n\ttext-align: center;\n}\n\n/* \u5404\u7A2E\u30DC\u30BF\u30F3\u3092\u5C0F\u3055\u304F\u3057\u3066\u6A2A\u4E26\u3073\u306B\u3059\u308B */\n.js-docked-compose .compose-content button.js-add-image-button,\n.js-docked-compose .compose-content .js-schedule-button,\n.js-docked-compose .compose-content .js-tweet-button,\n.js-docked-compose .compose-content .js-dm-button {\n\tdisplay: inline-block!important;\n\twidth: auto!important;\n}\n.js-docked-compose .compose-content .js-tweet-button.is-hidden,\n.js-docked-compose .compose-content .js-dm-button.is-hidden {\n\tdisplay: none!important;\n}\n.js-add-image-button > .label,\n.js-schedule-button > .label,\n.js-tweet-button > .label,\n.js-dm-button > .label {\n\tdisplay: none!important;\n}\n.js-add-image-button,\n.js-scheduler,\n.js-tweet-type-button {\n\tdisplay: inline-block;\n\ttransform: translateY(-65px);\n}\n\n\n/* \u30B5\u30A4\u30C9\u30D1\u30CD\u30EB\u306E\u30D5\u30C3\u30BF\u30FC\u3092\u6D88\u3059 */\n.js-docked-compose > footer {\n\tdisplay: none!important;\n}\n.js-docked-compose .compose-content {\n\tbottom: 0!important;\n}\n\n/* \u30B5\u30A4\u30C9\u30D1\u30CD\u30EB\u306E\u30D8\u30C3\u30C0\u30FC\u3092\u6D88\u3059 */\n.js-compose-header {\n\tposition: absolute!important;\n\tright: 20px!important;\n\tborder: 0!important;\n}\nheader.js-compose-header div.compose-title {\n\tdisplay: none!important;\n}\n.js-account-selector-grid-toggle {\n\tmargin-right: 50px!important;\n}\n\n/* \u30E2\u30FC\u30C0\u30EB\u306E\u4F4D\u7F6E\u8ABF\u6574 */\n.overlay:before,\n.ovl-plain:before,\n.ovl:before {\n\tdisplay: none!important;\n}\n\n/* \u30EA\u30C4\u30A4\u30FC\u30C8\u30E2\u30FC\u30C0\u30EB\u306E\u5E45\u8A2D\u5B9A */\n#actions-modal > .mdl {\n\tmax-width: 100%!important;\n}\n\n/* \u30E2\u30FC\u30C0\u30EB\u306E\u30E1\u30C7\u30A3\u30A2\u8868\u793A\u8ABF\u6574 */\n.js-modal-panel .js-embeditem {/* \u753B\u9762\u3044\u3063\u3071\u3044\u306B\u8868\u793A */\n\theight: 100%!important;\n\ttop: 0!important;\n\tbottom: 0!important;\n}\n.js-modal-panel .js-embeditem iframe {\n\tmax-width: 100%!important;\n\tmax-height: 100%!important;\n}\n.js-modal-panel .js-med-tweet {/* \u30C4\u30A4\u30FC\u30C8\u3092\u975E\u8868\u793A */\n\tdisplay: none!important;\n}\n\n/* \u9589\u3058\u308B\u30DC\u30BF\u30F3 */\n.js-modal-panel .mdl-dismiss {\n\tz-index: 2;\n}\n\n/* \u753B\u50CF\u8868\u793A\u3092\u8ABF\u6574\u3059\u308B */\n.js-modal-panel .js-embeditem {\n\tdisplay: flex!important;\n\tflex-direction: column;\n\tz-index: 1;\n}\n/* \u753B\u50CF\u8868\u793A\u90E8\u5206 */\n.js-modal-panel .js-embeditem .l-table {\n\tposition: relative!important;\n\tdisplay: block!important;\n\theight: auto!important;\n\tflex: auto;\n}\n\n.js-modal-panel .js-embeditem .l-table div,\n.js-modal-panel .js-embeditem .l-table a {\n\tposition: static!important;\n}\n.js-modal-panel .js-embeditem .l-table .js-media-image-link {\n\tpointer-events: none;\n}\n\n/* \u753B\u50CF\u30B5\u30A4\u30BA\u6307\u5B9A */\n.js-modal-panel .js-embeditem .l-table img,\n.js-modal-panel .js-embeditem .l-table iframe {\n\tposition: absolute;\n\tmax-width: 100%!important;\n\tmax-height: 100%!important;\n\twidth: auto!important;\n\theight: auto!important;\n\ttop: 0!important;\n\tbottom: 0!important;\n\tleft: 0!important;\n\tright: 0!important;\n\tmargin: auto!important;\n}\n.js-modal-panel .js-embeditem .l-table iframe {\n\twidth: 100%!important;\n\theight: 100%!important;\n}\n\n/* \u753B\u50CF\u691C\u7D22\u30DC\u30BF\u30F3\u306E\u4F4D\u7F6E\u8ABF\u6574 */\n.js-modal-panel .js-embeditem .l-table .reverse-image-search {\n\tposition: fixed!important;\n\tdisplay: block!important;\n\tleft: 10px!important;\n}\n\n/* \u753B\u50CF\u79FB\u52D5\u30DC\u30BF\u30F3\u306E\u8868\u793A\u4F4D\u7F6E\u3092\u8ABF\u6574\u3059\u308B */\n.js-modal-panel .js-embeditem .js-media-gallery-prev,\n.js-modal-panel .js-embeditem .js-media-gallery-next {\n\tposition: relative!important;\n\ttop: auto!important;\n\twidth: 50%!important;\n\theight: 60px!important;\n}\n.js-modal-panel .js-embeditem .js-media-gallery-next {\n\tmargin-top: -60px;\n\talign-self: flex-end;\n}\n\n/* \u753B\u50CF\u4E0B\u90E8\u306E\u30EA\u30F3\u30AF\u3092\u975E\u8868\u793A */\n.med-origlink,\n.med-flaglink {\n\tdisplay: none!important;\n}\n\n\n/* \u30C7\u30D0\u30C3\u30B0\u7528\u30E2\u30B6\u30A4\u30AF */\n.tj_blur .js-stream-item-content {\n\tfilter: blur(5px);\n}\n.tj_blur section.column:nth-child(1) .js-stream-item-content {\n\tfilter: none;\n}\n",e.appendChild(f)}}]),a}();window.tj_deck=null;function tjDeckStart(){console.log("TJDeck\u30B9\u30BF\u30FC\u30C8\uFF01\uFF01\uFF01"),window.tj_deck=new TJDeck,window.tj_deck.manageStyle(),window.tj_deck.manageScroll(),window.tj_deck.manageBack(),window.tj_deck.observeClms(),window.tj_deck.observeModals(),window.tj_deck.hideMenu(),window.tj_deck.addTJNav(),document.querySelector("textarea.js-compose-text").spellcheck=!1}if(document.querySelector(".js-app-columns"))tjDeckStart();else var timer=setInterval(function(){document.querySelector(".js-app-columns")?(tjDeckStart(),clearInterval(timer)):console.log("\u307E\u3060\u30ED\u30FC\u30C9\u4E2D")},500);