Greasy Fork

tj-deck

TweetDeckをスマホで使いやすくするスクリプト

目前为 2019-05-31 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.icu/scripts/383989/703470/tj-deck.js

"use strict";
var _createClass = function() {
    function a(e, f) {
        for (var h, g = 0; g < f.length; g++) h = f[g], h.enumerable = h.enumerable || !1, h.configurable = !0, "value" in h && (h.writable = !0), Object.defineProperty(e, h.key, h)
    }
    return function(e, f, g) {
        return f && a(e.prototype, f), g && a(e, g), e
    }
}();

function _classCallCheck(a, e) {
    if (!(a instanceof e)) throw new TypeError("Cannot call a class as a function")
}
var TJScrollTask = function() {
    function a(e, f, g) {
        _classCallCheck(this, a), this.tjDeck = e, this.$t = e.$wrap, this.x = f, this.d = g, this.sl = e.wrapL, this.sTime = Date.now(), this.ended = !1, this._bindAnim = this._anim.bind(this);
        var h = e.getClms();
        0 > f || 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;
                1 < e && !this.ended && (this.stop(), e = 1), this.tjDeck.scrollWrap(this._easeOut(e, f, g, 1)), 1 > e && 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.1.4 for Android App", 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(), this.updateNavBottom(), this.updateHideTweetBtn(), this.updateHideSettingBtn()
        }
        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),
                    nav_bottom: this.getOption("nav_bottom", !0),
                    hide_tweet_btn: this.getOption("hide_tweet_btn", !1),
                    hide_setting_btn: this.getOption("hide_setting_btn", !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; g < f.length; g++) this.setOption(f[g], e[f[g]])
            }
        }, {
            key: "getClms",
            value: function getClms() {
                return this.$wrap.querySelectorAll("section.column")
            }
        }, {
            key: "back",
            value: function back() {
                if ("none" != this.$options.style.display) return this.updateOption(), void this.hideOptionPanel();
                var e = document.querySelector(".mdl-dismiss");
                if (e) return void e.click();
                if (this.isShownDrawer()) return void this.hideDrawer();
                var f = this.getClosestColumn(this.wrapL),
                    g = f.querySelector(".js-column-back");
                if (g) return void g.click()
            }
        }, {
            key: "isShownItem",
            value: function isShownItem() {
                return !!document.querySelector(".mdl-dismiss") || this.isShownDrawer()
            }
        }, {
            key: "isShownDrawer",
            value: function isShownDrawer() {
                return !!document.querySelector(".hide-detail-view-inline")
            }
        }, {
            key: "hideDrawer",
            value: function hideDrawer() {
                var e = document.querySelector(".js-hide-drawer");
                e && e.click()
            }
        }, {
            key: "showDrawer",
            value: function showDrawer() {
                var e = document.querySelector(".js-show-drawer");
                e && e.click()
            }
        }, {
            key: "manageBack",
            value: function manageBack() {
                history.pushState(null, null, ""), window.addEventListener("popstate", function() {
                    this.back(), history.pushState(null, null, "")
                }.bind(this))
            }
        }, {
            key: "manageHeaderNav",
            value: function manageHeaderNav() {
                this.setHeaderNavListener(), this.observeHeaderNav()
            }
        }, {
            key: "setHeaderNavListener",
            value: function setHeaderNavListener() {
                console.log("setHeaderNavListener");
                for (var e = document.querySelectorAll(".js-header-action[data-column]"), f = 0; f < e.length; f++) this.setHeaderNavLinkListener(e[f])
            }
        }, {
            key: "setHeaderNavLinkListener",
            value: function setHeaderNavLinkListener(e) {
                e.hasAttribute("data-tj-listener") || (e.addEventListener("click", function(f) {
                    f.preventDefault();
                    var g = e.getAttribute("data-column"),
                        h = this.$wrap.querySelector("section.column[data-column=" + g + "]");
                    return h && this.scrollWrapAnim(h.offsetLeft), !1
                }.bind(this)), e.setAttribute("data-tj-listener", !0))
            }
        }, {
            key: "observeHeaderNav",
            value: function observeHeaderNav() {
                var e = new MutationObserver(this.setHeaderNavListener.bind(this));
                e.observe(document.querySelector("#column-navigator"), {
                    attributes: !1,
                    characterData: !1,
                    childList: !0
                })
            }
        }, {
            key: "observeModals",
            value: function observeModals() {
                for (var e = new MutationObserver(function(j) {
                    for (var k, l, m = 0; m < j.length; m++) {
                        k = j[m];
                        for (var o = 0; o < k.addedNodes.length; o++) l = k.addedNodes[m], this.stopAnkerFromModal(l)
                    }
                }.bind(this)), f = {
                    attributes: !1,
                    characterData: !0,
                    childList: !0
                }, g = document.querySelectorAll(".js-modals-container, .js-modal"), h = 0; h < g.length; h++) e.observe(g[h], f)
            }
        }, {
            key: "stopAnkerFromModal",
            value: function stopAnkerFromModal(e) {
                for (var g, f = e.querySelectorAll("a"), h = function(k) {
                    return k.preventDefault(), k.target.removeEventListener("click", h), !1
                }, j = 0; j < f.length; j++) g = f[j], g.href && g.href.match(/#$/) && g.addEventListener("click", h)
            }
        }, {
            key: "observeClms",
            value: function observeClms() {
                var e = new MutationObserver(function(g) {
                    for (var h, j, k = 0; k < g.length; k++) j = g[k], j.addedNodes[0] && (h = j.addedNodes[0]), j.removedNodes[0] && (j.nextSibling instanceof Element ? h = j.nextSibling : j.previousSibling instanceof Element ? h = j.previousSibling : h = this.getClms()[0]);
                    h && h instanceof Element && this.scrollWrapAnim(h.offsetLeft)
                }.bind(this));
                e.observe(this.$wrap, {
                    attributes: !1,
                    characterData: !1,
                    childList: !0
                })
            }
        }, {
            key: "manageScroll",
            value: function manageScroll() {
                var e, g, h, f = Date.now(),
                    j = null;
                document.querySelector(".js-app-columns-container").addEventListener("scroll", function(k) {
                    k.target.scrollLeft = 0
                }.bind(this)), document.querySelector(".js-app-columns").addEventListener("touchstart", function(k) {
                    1 < k.touches.length || this.isShownItem() || (e = this._getPosObj(k), g = e, j = -1, f = Date.now(), h = this.getClosestColumn(this.wrapL))
                }.bind(this)), window.addEventListener("touchmove", function(k) {
                    if (j) {
                        if (0 > j) {
                            var l = this._getPosObj(k);
                            if (Math.abs(l.x - e.x) < Math.abs(l.y - e.y)) return void(j = 0);
                            j = 1
                        }
                        if (1 == j) {
                            this.scrollTask && this.scrollTask.stop();
                            var l = this._getPosObj(k);
                            g = l, this.options.light_clm || this.scrollWrap(this.wrapL + g.x - l.x)
                        }
                    }
                }.bind(this)), window.addEventListener("touchend", function() {
                    if (!(1 > j)) {
                        j = null;
                        var p, l = Date.now(),
                            m = g,
                            o = e.x - m.x;
                        0.5 <= Math.abs(o) / (l - f) ? 0 < o ? (p = h.nextElementSibling, this.hideMenu()) : (p = h.previousElementSibling, !p && this.showMenu()) : p = this.getClosestColumn(this.wrapL), p && p instanceof Element && this.scrollWrapAnim(p.offsetLeft)
                    }
                }.bind(this))
            }
        }, {
            key: "scrollWrapAnim",
            value: function scrollWrapAnim(e) {
                this.scrollTask && this.scrollTask.stop(), this.scrollTask = new TJScrollTask(this, e, this.options.light_clm ? 0 : 500)
            }
        }, {
            key: "scrollWrap",
            value: function scrollWrap(e) {
                var f = this.getClms();
                0 > e || 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 < f.length; g++) if (h = Math.abs(e - f[g].offsetLeft), h <= f[g].offsetWidth / 2) return f[g];
                return f[f.length - 1]
            }
        }, {
            key: "_getPosObj",
            value: function _getPosObj(e) {
                return {
                    x: e.touches[0].pageX,
                    y: e.touches[0].pageY
                }
            }
        }, {
            key: "hideMenu",
            value: function hideMenu() {
                document.body.classList.add("tj_hide_menu")
            }
        }, {
            key: "showMenu",
            value: function showMenu() {
                document.body.classList.remove("tj_hide_menu")
            }
        }, {
            key: "showTJSetting",
            value: function showTJSetting() {}
        }, {
            key: "addTJNav",
            value: function addTJNav() {
                var e = document.createElement("nav");
                e.classList.add("tj_nav"), e.appendChild(this.createTweetBtn()), e.appendChild(this.createSettingBtn()), document.querySelector(".application").appendChild(e)
            }
        }, {
            key: "createTweetBtn",
            value: function createTweetBtn() {
                var e = document.createElement("button");
                return e.classList.add("tj_tweet_btn", "Button", "Button--primary", "tweet-button"), e.innerHTML = "<i class=\"Icon icon-compose icon-medium\"></i>", 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 = "<i class=\"Icon icon-settings\"></i>", 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<p class=\"title\">TJDeck \u8A2D\u5B9A</p>\n<div>\n\t<label for=\"tj_ops_light\">\u57FA\u672C\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u3092\u306A\u304F\u3059:</label>\n\t<input type=\"checkbox\" name=\"tj_ops_light\" id=\"tj_ops_light\">\n</div>\n<div>\n\t<label for=\"tj_ops_light_clm\">\u30AB\u30E9\u30E0\u5207\u308A\u66FF\u3048\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u3092\u306A\u304F\u3059:</label>\n\t<input type=\"checkbox\" name=\"tj_ops_light_clm\" id=\"tj_ops_light_clm\">\n</div>\n<div>\n\t<label for=\"tj_ops_nav_bottom\">\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u4E0B\u306B\u8868\u793A\u3059\u308B:</label>\n\t<input type=\"checkbox\" name=\"tj_ops_nav_bottom\" id=\"tj_ops_nav_bottom\">\n</div>\n<div>\n\t<label for=\"tj_ops_hide_tweet_btn\">\u30C4\u30A4\u30FC\u30C8\u30DC\u30BF\u30F3\u3092\u6D88\u3059:</label>\n\t<input type=\"checkbox\" name=\"tj_ops_hide_tweet_btn\" id=\"tj_ops_hide_tweet_btn\">\n</div>\n<div>\n\t<label for=\"tj_ops_hide_setting_btn\">\u8A2D\u5B9A(\u6B6F\u8ECA)\u30DC\u30BF\u30F3\u3092\u6D88\u3059:</label>\n\t<input type=\"checkbox\" name=\"tj_ops_hide_setting_btn\" id=\"tj_ops_hide_setting_btn\">\n</div>\n<div>\n\t<label for=\"tj_ops_blur\">\u30AB\u30E9\u30E0\u3092\u307C\u304B\u3059(\u64AE\u5F71\u7528):</label>\n\t<input type=\"checkbox\" name=\"tj_ops_blur\" id=\"tj_ops_blur\">\n</div>\n<div>\n\t<p>Script Version: " + this.version + "</p>\n</div>\n<div>\n\t<p>\u3053\u306E\u8A2D\u5B9A\u753B\u9762\u306F\u30C9\u30ED\u30EF\u30FC\u30E1\u30CB\u30E5\u30FC\u304B\u3089\u3067\u3082<br>\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002</p>\n</div>\n<div>\n\t<a href=\"javascript:void(0)\" class=\"tj_ops_close\">\u9589\u3058\u308B</a>\n</div>\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", "nav_bottom", "hide_tweet_btn", "hide_setting_btn"].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", "nav_bottom", "hide_tweet_btn", "hide_setting_btn"].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(), this.updateNavBottom(), this.updateHideTweetBtn(), this.updateHideSettingBtn()
            }
        }, {
            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: "updateNavBottom",
            value: function updateNavBottom() {
                this.options.nav_bottom ? document.body.classList.add("tj_nav_bottom") : document.body.classList.remove("tj_nav_bottom")
            }
        }, {
            key: "updateHideTweetBtn",
            value: function updateHideTweetBtn() {
                this.options.hide_tweet_btn ? document.body.classList.add("tj_hide_tweet_btn") : document.body.classList.remove("tj_hide_tweet_btn")
            }
        }, {
            key: "updateHideSettingBtn",
            value: function updateHideSettingBtn() {
                this.options.hide_setting_btn ? document.body.classList.add("tj_hide_setting_btn") : document.body.classList.remove("tj_hide_setting_btn")
            }
        }, {
            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\u30D0\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(-60px);\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\u306E\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u4E0B\u306B\u8868\u793A */\n.tj_nav_bottom #column-navigator .js-column-nav-list ul {\n\tbox-sizing: border-box;\n\tposition: fixed;\n\tdisplay: flex;\n\twidth: calc(" + document.body.clientWidth + "px - 50px)!important;\n\theight: 42px;\n\tbottom: 0;\n\tleft: 60px;\n\tpadding: 0;\n\tbackground: #1c2938;\n\toverflow-y: hidden;\n\toverflow-x: auto;\n\twhite-space:nowrap;\n\ttext-align: center;\n}\n.tj_nav_bottom #column-navigator .js-column-nav-list ul li {\n\tdisplay: block;\n\tmargin: 0 auto;\n}\n.tj_nav_bottom #column-navigator .js-column-nav-list ul:before,\n.tj_nav_bottom #column-navigator .js-column-nav-list ul:after {\n\tcontent: \"\";\n\tmin-width: 25px;\n\tvisibility: hidden;\n\tmargin-left: auto;\n}\n.tj_nav_bottom #column-navigator .js-column-nav-list ul li a div.obj-left{\n\tmargin: 0!important;\n}\n\n/* \u30B5\u30A4\u30C9\u30D0\u30FC\u304C\u8868\u793A\u306A\u3089\u305A\u3089\u3059 */\n.tj_nav_bottom.tj_hide_menu #column-navigator .js-column-nav-list ul {\n\twidth: " + document.body.clientWidth + "px!important;\n}\n\n/* \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306E\u30E9\u30D9\u30EB\u3092\u524A\u9664 */\n.js-column-nav-menu-flyover {\n\tdisplay: none!important;\n}\n\n/* \u30AB\u30E9\u30E0\u306E\u30B9\u30AF\u30ED\u30FC\u30EB\u3092\u4E0B\u307E\u3067\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B */\n.column-scroller {\n\tpadding-bottom: 110px;\n}\n\n/* \u30B5\u30A4\u30C9\u30D0\u30FC\u304C\u51FA\u305F\u3089TJDeck\u306E\u30CA\u30D3\u3092\u96A0\u3059 */\n.hide-detail-view-inline .tj_nav {\n\tdisplay: none;\n}\n\n/* \u30B5\u30A4\u30C9\u30D0\u30FC\u306E\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u304C\u4E0B\u306A\u3089\u4F4D\u7F6E\u3092\u305A\u3089\u3059 */\n.tj_nav_bottom .tj_tweet_btn {\n\ttransform: translateY(-35px);\n}\n.tj_nav_bottom .tj_setting_btn {\n\ttransform: translateY(-42px);\n}\n\n.tj_tweet_btn {\n\tz-index: 299;\n\tposition: fixed!important;\n\twidth: 50px!important;\n\theight: 50px!important;\n\tbottom: 10px!important;\n\tright: 10px!important;\n\tpadding: 0;\n\tbackground-color: #1da1f2;\n\tcolor: #fff;\n\tborder-radius: 50px;\n\tfont-size: 16px;\n\tline-height: 1em;\n\ttext-align: center;\n\tbox-shadow: 1px 1px 5px rgba(0, 0, 0, .5);\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\n.tj_hide_setting_btn .tj_setting_btn,\n.tj_hide_tweet_btn .tj_tweet_btn {\n\tdisplay: none!important;\n}\n.tj_setting_btn {\n\tz-index: 299;\n\tposition: fixed;\n\twidth: 40px;\n\theight: 40px;\n\tbottom: 2px;\n\tleft: 10px;\n\tbackground-color: transparent;\n\tcolor: #333;\n\tbackground: #fff;\n\tborder-radius: 50px;\n\ttext-align: center;\n\tbox-shadow: 1px 1px 5px rgba(0, 0, 0, .5);\n\topacity: .5;\n}\n.tj_setting_btn > i.icon-settings {\n\tmargin-top: -2px;\n\tline-height: 40px;\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\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/* \u30B5\u30A4\u30C9\u30D1\u30CD\u30EB\u3092\u30B5\u30A4\u30C9\u30D0\u30FC\u3088\u308A\u4E0A\u306B\u8868\u793A */\n.hide-detail-view-inline .js-app-content {\n\tz-index: 250!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\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.manageHeaderNav(), 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);