T3ResizableConsole

Makes TYPO3's debug console resizable.

当前为 2020-09-08 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT
/* eslint-disable no-undef */

// ==UserScript==
// @name           T3ResizableConsole
// @namespace      https://github.com/TheLastZombie/
// @version        1.0.2
// @description    Makes TYPO3's debug console resizable.
// @description:de Erlaubt die Höhenänderung der TYPO3-Debug-Konsole.
// @homepageURL    https://github.com/TheLastZombie/userscripts/
// @supportURL     https://github.com/TheLastZombie/userscripts/issues/new?labels=T3ResizableConsole
// @author         TheLastZombie
// @match          *://*/typo3/index.php*
// @grant          none
// @require        https://cdn.jsdelivr.net/npm/interactjs/dist/interact.min.js
// @icon           https://raw.githubusercontent.com/TheLastZombie/userscripts/master/icons/T3ResizableConsole.png
// @license        MIT
// ==/UserScript==

(function () {
  interact('#typo3-debug-console').resizable({
    edges: {
      top: true
    }
  })
    .on('resizemove', event => {
      document.querySelectorAll('.t3js-messages.messages')[0].style.height = (event.rect.height - 77) + 'px'
    }).on('resizestart', () => {
      document.querySelectorAll('#typo3-contentIframe')[0].style.pointerEvents = 'none'
    }).on('resizeend', () => {
      document.querySelectorAll('#typo3-contentIframe')[0].style.pointerEvents = 'initial'
    })

  // resizestart and resizeend events are required due to the iframe displayed above the console.
  // See https://github.com/taye/interact.js/issues/200 for details.
})()

// @license-end